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