N,T = gets.split.map(&:to_i)
c = Array.new
t = Array.new
for i in 0..N-1
    c[i],t[i] = gets.split.map(&:to_i)
    if t[i] > T 
        c[i] += 1000
    end
end

if c.min > 1000
    puts 'TLE'
else
    puts c.min
end
