H, M = map(int, input().split()) time = H * 100 + M if time < 730: print("Yes") elif time > 830: print("No") else: print("Late")