h, m = map(int, input().split()) t = h * 3600 + m * 60 + 30 st = 7 * 3600 + 30 * 60 + 0 et = 8 * 3600 + 30 * 60 + 0 if t < st: print("Yes") elif st <= t and t <= et: print("Late") else: print("No")