N , T = gets.chomp.split(" ").map(&:to_i)
hash = Hash.new(0)
c = 0
t = 0
N.times do |num|
  c, t = gets.chomp.split(" ").map(&:to_i)
  hash[c] = t
end
result = hash.select{ |k,v| v <= T }.min
if result.nil?
  print("TLE")
else
  print(result[0])
end
