N , T = gets.split.map(&:to_i)
c = Array.new(N,0)
t = Array.new(N,0)
for i in 0..N-1 do
  c[i],t[i] = gets.split.map(&:to_i)
end
ans = 10000

ansarray = [ans,0]
for i in 0..N-1 do
  if t[i] <= T
    ansarray[1] = c[i]
    ans = ansarray.min
  end
end
puts ans == 10000 ? "TLE" : ans
