https://www.acmicpc.net/problem/16199
import java.util.*
import java.lang.String.format
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var y=s.nextInt()
var m=s.nextInt()
var d=s.nextInt()
var y1=s.nextInt()
var m1=s.nextInt()
var d1=s.nextInt()
var sum=0
if(m<m1) sum=y1-y
else if(m==m1 && d<=d1) sum=y1-y
else sum=y1-y-1
println(sum)
println(format("%d",y1-y+1))
println(format("%d",y1-y))
}