N,T = gets.split(" ").map(&:to_i)
routes = []
a = nil
N.times do
  routes << gets.split(" ").map(&:to_i)
end
cost_min = routes[0][0]
for i in 0...N
  if (routes[i][1] <= T) && routes[i][0] < cost_min then cost_min = routes[i][0] ; a ||= 1 end
end
puts a ? cost_min : "TLE"