H, M = map(int, input().split()) start = 7 * 60 + 30 finish = start + 60 time = H * 60 + M + 0.5 if time < start: print("Yes") elif start < time < finish: print("Late") else: print("No")