N, T = gets.chomp.split.map(&:to_i)

cost_min = (0...N).inject (1001) { |res, i|
    c, t = gets.chomp.split.map(&:to_i)
    res = t <= T ? [res, c].min : res
}

puts cost_min > 1000 ? "TLE" : cost_min