H, M = [int(i) for i in input().split()] if H < 7 or (H == 7 and M < 30): print("Yes") elif (H == 7 and M >= 30) or (H == 8 and M <30): print("Late") else: print("No")