input_num = gets.chomp.split.map!(&:to_i)
route = [1001 ,1001]
num = 0
(1..input_num[0]).each{ |i|
  times = [0 ,0]
  times = gets.chomp.split.map!(&:to_i)
  if times[1] <= input_num[1] then
    if times[0] < route[0] then
      route = times
      num = i
    end
  end
}
if route[1] == 1001 then
  puts "TLE"
else
  puts route[0]
end