N, T, *rest = $stdin.read.split
cts = rest.each_slice(2).to_a
ret = 1000
flag = 0
cts.each do |ct|
  if ct[1].to_i <= T
    ret = ct[0].to_i if ct[0].to_i <= ret
    flag = 1
  end
end
 
if flag == 1
  puts ret
elseif flag == 0
  puts 'TLE'
end
