h, m = (int(s) for s in input().split()) t = h*60+m if t < 7 * 60 + 30: print("Yes") elif t >= 8 * 60 + 30: print("No") else: print("Late")