# Time Limit Exceeded
N,T = gets.chomp.split(" ").map(&:to_i)
c = []
t = []
time_min = 1001
cost_min = 1001
ans_index = 0
flg = 0
for i in 0..N-1 do
    c[i],t[i] = gets.chomp.split(" ").map(&:to_i)
    if t[i] <= T && c[i] < cost_min
        ans_index = i
        time_min = t[i]
        cost_min = c[i]
        flg = 1
    end
end
if flg == 1 
    puts c[ans_index]
elsif flg == 0
    puts "TLE"    
end