N, T, *rest = $stdin.read.split
cts = rest.each_slice(2).to_a
ans = 10000
ts = []
cts.each do |ct|
  ts << ct[1]
  if ct[1] <= T and ct[0] <= ans
    ans = ct[0]
  end
end

if ts.min > T
  puts 'TLE'
end

puts ans