n, t = gets.split.map(&:to_i)
ct = []
n.times do
  ct.push gets.split.map(&:to_i)
end
valids = ct.select { |e| e.last <= t }
if valids.empty?
  puts 'TLE'
else
  puts valids.sort_by { |e| e.first }.first.first
end
