inp = input() split_first = inp.split(' ') Y = int(split_first[0]) M = int(split_first[1]) D = int(split_first[2]) if (Y < 1989) or (2019 < Y): print('No') elif(Y==1989) and(M==1) and (D<8): print('No') elif(Y==2019) and (4