N, T = gets.chomp.split(" ").map(&:to_i)
S = []
N.times{
  S << gets.chomp.split(" ").map(&:to_i)
}

sel = S.select{|c, t| t <= T}

if sel.empty? then
  puts 'TLE'
else
  puts sel.min_by{|c, t| c}[0]
end
