n, t = gets.split.map(&:to_i)

costs = {}
min = 999

n.times do |_|
  c_tmp, t_tmp = gets.split.map(&:to_i)
  costs[c_tmp] = t_tmp
  min = c_tmp if c_tmp <= min && t_tmp <= t
end

puts (min != 999 ? min : 'TLE')
