# https://atcoder.jp/contests/abc112/tasks/abc112_b


N, T = gets.split.map(&:to_i)
cts = Array.new(N)
N.times do |i|
  cts[i] = gets.split.map(&:to_i)
end

ans = cts.select { |c, t| t <= T }.map { |c, t| c }&.min || 'TLE'
puts ans
