def f(h, m):
    return h * 60 + m

H, M = map(int, input().split())
now = f(H, M) + 0.5
if now < f(7, 30):
    print("Yes")
elif f(7, 30) < now < f(8, 30):
    print("Late")
else:
    print("No")