first_line = gets
count,max_time = first_line.split(' ')
count = count.to_i
max_time = max_time.to_i

data = []

count.times{|c|
  line = gets
  cost,time = line.split(' ')
  cost = cost.to_i
  time = time.to_i
  data << {cost: cost, time: time}
}

data.sort_by! {|d|
  d[:time]  
}

result = nil

data.reverse_each {|d|
  if d[:time]<=max_time
    result = d[:cost]
  end
}

if result.nil?
  puts 'TLE'
else
  puts result
end
