n, t = gets.chomp.split.map(&:to_i)
c_ts = []
(0..(n - 1)).each do |i|
  c_ts[i] = gets.chomp.split.map(&:to_i)
end
ans = c_ts.select { |c_t| c_t.last <= t }.map(&:first).min
ans.nil? ? puts('TLE') : puts(ans)