def main(): H,M = input().split() H = int(H) M = int(M) get_up = H*60 + M if get_up < 7*60+30: print("Yes") elif 7*60+30 <= get_up < 8*60+30: print("Late") else: print("No") if __name__ == "__main__": main()