https://www.acmicpc.net/problem/16199
#include <iostream>
using namespace std;
int main() {
int y,m,d,y1,m1,d1;
cin>>y>>m>>d>>y1>>m1>>d1;
int sum=0;
if(m<m1) sum=y1-y;
else if(m==m1 && d<=d1) sum=y1-y;
else sum=y1-y-1;
cout<<sum<<"\n";
cout<<y1-y+1<<"\n";
cout<<y1-y;
}