N, T = gets.chomp.split().map(&:to_i)
data = []
N.times do
  a, b = gets.chomp.split().map(&:to_i)
  data << [a, b]
end
info =  data.select{ |ary| ary[1] <= T }.sort_by{ |ary| ary[0] }
if info.length == 0
  puts 'TLE'
else
  puts info[0][0]
end