h,w = list(map(int, input().split(' '))) assert 0 <= h <= 23, "assertion error" assert 0 <= w <= 59, "assertion error" t = h*60 + w if t < 7*60+30: print('Yes') elif t < 8*60 + 30: print('Late') else: print('No')