https://www.acmicpc.net/problem/16199
using System;
class Program
{
static void Main() {
string[] s=Console.ReadLine().Split(" ");
string[] s1=Console.ReadLine().Split(" ");
int y=int.Parse(s[0]);
int m=int.Parse(s[1]);
int d=int.Parse(s[2]);
int y1=int.Parse(s1[0]);
int m1=int.Parse(s1[1]);
int d1=int.Parse(s1[2]);
int sum=0;
if(m<m1) sum=y1-y;
else if(m==m1 && d<=d1) sum=y1-y;
else sum=y1-y-1;
Console.WriteLine(sum);
Console.WriteLine(y1-y+1);
Console.WriteLine(y1-y);
}
}