n,t = gets.chomp.split(' ').map(&:to_i)
min_c = 1001
n.times do
  path =  gets.chomp.split(' ').map(&:to_i)
  if path[1] <= t
    if path[0] < min_c
      min_c = path[0]
    end
  end
end
if min_c < 1001
  puts min_c
else
  puts "TLE"
end