h, m = map(int, input().split()) s = 7 * 60 + 29 e = 8 * 60 + 29 t = h * 60 + m if t <= s: print('Yes') elif s < t < e: print('Late') else: print('No')