h, m = map(int(input())) if h < 7: print('Yes') elif h == 7 and m < 30: print('Yes') elif h == 7 and m > 30: print('Late') elif h == 8 and m < 30: print('Late') else: print('No')