N, T, *rest = $stdin.read.split
cts = rest.each_slice(2).to_a
ret = 0
flag = 0
cts.each do |ct|
  if ct[1] <= T
    ret = [ct[0],ret].max
    flag = 1
  end
end

if flag == 1
  p ret
else
  p 'TLE'
end
  