n, t = gets.split.map(&:to_i)
d = []
n.times{|i|
  c, tt = gets.split.map(&:to_i)
  d << {
    :cost => c,
    :time => tt
  }
}
d.sort!{|a, b|
  v = -1 if a[:cost] < b[:cost]
  v = 1 if a[:cost] > b[:cost]
  v = 0 if a[:cost] == b[:cost]
  v
}
d.each{|dd|
  if dd[:time] <= t
    puts dd[:cost]
    exit
  end
}
puts "TLE"
