import Control.Monad (replicateM)
import Data.List (sortBy)
import Data.Ord (comparing)

main = do
    [n,t] <- map read.words<$>getLine
    roots <- replicateM n getRoot
    let result = minimumCost t roots
    maybe (putStrLn "TLE") print result

getRoot :: IO (Int,Int)
getRoot = do
    [c,t] <- map read.words<$>getLine
    return (c,t)

minimumCost :: Int -> [(Int,Int)] -> Maybe Int
minimumCost rimit = safeHead.map fst.sortBy (comparing fst).filter (\(c,t) -> t <= rimit)

safeHead xs
  | null xs = Nothing
  | otherwise = Just $ head xs
