N,T = gets.chomp.split(" ").map(&:to_i)
ary = Array.new(N).map{Array.new(2)}
N.times do |i|
  ary[i] = gets.chomp.split(" ").map(&:to_i)
end 
min = 1010
ary.each do |ct|
  if ct[1] <= T && ct[0] < min
    min = ct[0]
  end
end

unless min == 1010
  puts min
else 
  puts "TLE"
end