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