H = int(input()) M = int(input()) 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")