h, m = map(int, input().split()) x = h * 60 + m s = 7 * 60 + 30 t = s + 60 print('Yes' if x < s else 'Late' if x < t else 'No')