n, t = gets.chomp.split.map(&:to_i)

ary = []
n.times do
  ci, ti = gets.chomp.split.map(&:to_i)
  ary << [ci,ti]
end

min = Float::INFINITY
ary.each do |item|
  if item[1] <= t
    min = [min, item[0]].min
  end
end
if min == Float::INFINITY
  print('TLE')
else
  print(min)
end
