N, T = gets.split.map(&:to_i)
c = []
t = []
N.times do |i|
	c[i], t[i] = gets.split.map(&:to_i)
end

ans = "TLE"
until c.empty? do
  if t[c.index(c.min)] > T
    t.delete_at(c.index(c.min))
    c.delete_at(c.index(c.min))
  else
    ans = c.min
    break
  end
end
puts ans
