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