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