n, t = gets.split.map(&:to_i)
ct = (1..n).map{|_| gets.split.map(&:to_i)}.sort{|a, b| a.last == b.last ? a.first <=> b.first : a.last <=> b.last}
x = ct.select{|v| v.last <= t}
puts x.length == 0 ? "TLE" : x.map(&:first).min