n,t= gets.split.map(&:to_i)
res=0
cnt=100
n.times do |i|
  a= gets.split.map(&:to_i)
  res = a[0] if i == 0
  if (a[1]<=t) && (a[0]<res)
    cnt = a[1]
    res = a[0]
  end
end
puts (cnt!=100) ? res : :TLE