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