n, t = gets.split(' ')

arr = []

n.to_i.times.with_index do |i|
  cost, time = gets.split(' ')
  hash = {cost: cost.to_i, time: time.to_i}
  arr.push hash
end

arr.reject! do |h|
  h[:time] > t.to_i
end

result = arr.min {|a, b| a[:cost] <=> b[:cost] }&.[](:cost)

puts result ? result : 'TLE'