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