H, M = map(int, input().split())
wake = H * 3600 + M * 60 + 30
start = 7 * 3600 + 30 * 60  # 27000
end = 8 * 3600 + 30 * 60    # 30600

if wake < start:
    print("Yes")
elif wake <= end:
    print("Late")
else:
    print("No")