h,m = map(int,input().split()) c = h*100+m if c < 730: print("Yes") elif c < 830: print("Late") else: print("No")