H, M = map(int, input().split()) if H <= 6 or H == 7 and M <= 29: print("Yes") elif H == 7 or H == 8 and M <= 29: print("Late") else: print("No")