H, M = map(int, input().split()) time = H*60+M if time < 7*60+30: print('Yes') elif 7*60+30 <= time <= 8*60+30: print('Late') else: print('No')