h, m = [int(x) for x in input().split()] if (h <= 6) 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")