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