H, M = map(int, input().split()) if H*60+M < 450: print("Yes") elif 450 <= H*60+M < 510: print("Late") else: print("No")