H, M = map(int, input().split()) a = 100 * H + M if a < 730: print('Yes') elif a <= 830: print('Late') else: print('No')