class Job
   attr_accessor :cost, :time
end
jobs = []
 
n, t = gets.split(" ").map(&:to_i)
n.times do
  job = Job.new
  m = gets.chomp.split(" ").map(&:to_i)
  job.cost = m[0].to_i
  job.time = m[1].to_i
  jobs.push(job)
end
jobs.sort! do |a, b|
  (a.cost <=> b.cost).nonzero? ||
    (a.time <=> b.time)
end
 
for i in 0..n-1 do
  if jobs[i].time <= t
    puts jobs[i].cost
    exit
  end
end
puts "TLE"
