n, t = gets.split.map(&:to_i)

costs = {}

n.times do |_|
  c_tmp, t_tmp = gets.split.map(&:to_i)
  costs[c_tmp] = t_tmp
end

costs = Hash[costs.sort]
cnt = 0
costs.each do |k, v|
  cnt += 1
  if v <= t
    puts k
    exit(0)
  else
    puts 'TLE' if costs.size == cnt
  end
end
