import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  [n,t] <- map (read::String->Int) . words <$> getLine
  ct <- listToTuple . map (map (read::String->Int)) . map words . lines <$> getContents
  let ans = filter((<=t) .snd) ct
  putStrLn $if ans==[] then "TLE" else (show .fst .minimum)ans
  
listToTuple [] = []
listToTuple ([x1,x2] : xs) = (x1,x2) : listToTuple xs