H,M = map(str,input().split()) H = H.zfill(2) M = M.zfill(2) HM = int(H+M) if HM < 730: print("Yes") elif 730 <= HM < 830: print("Late") else: print("No")