inputs = gets.split(" ").map!(&:to_i)
n = inputs[0]
timeLimit = inputs[1]

flag = false
mincost = 1001
n.times do |i|
  route = gets.split(" ").map!(&:to_i)
  if route[1] <= timeLimit && route[0] < mincost then
    mincost = route[0]
    flag = true
  end
end 
if flag == true then
  p mincost
else 
  puts "TLE"
end