H, M = map(int, input().split()) wake_up_time = H * 60 + M asakatsu_start_time = 7 * 60 + 30 asakatsu_end_time = 8 * 60 + 30 if H == 8 and M == 30: print("Late") elif wake_up_time < asakatsu_start_time: print("Yes") elif asakatsu_start_time <= wake_up_time <= asakatsu_end_time: print("Late") else: print("No")