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