n, tl = gets.split.map(&:to_i)
min_c_init = 10000
min_c = min_c_init
for i in 0...n do
  c, t = gets.split.map(&:to_i)
  if t <= tl && min_c > c
    min_c = c
  end
end
puts (min_c < min_c_init) ? min_c : "TLE"
