n,t = gets.chomp.split.map(&:to_i)
routes = []
n.times do
  routes <<  gets.chomp.split.map(&:to_i)
end

able = routes.select {|r| r[1] <= t}
able.sort! {|r,n| r[0] <=> n[0]}

puts able.empty? ?  'TLE' : able[0][0]
