def judge_wakeup_time(H, M): wakeup_time = H * 60 + M + 30 start_time = 7 * 60 + 30 end_time = 8 * 60 + 30 if wakeup_time < start_time: return "Yes" elif start_time <= wakeup_time <= end_time: return "Late" else: return "No" H, M = map(int, input().split()) result = judge_wakeup_time(H, M) print(result)