import           Control.Monad

readWordsLn :: Read a => IO [a]
readWordsLn = map read . words <$> getLine

main :: IO ()
main = do
    [n, t] <- readWordsLn :: IO [Int]
    cts    <- replicateM n readWordsLn :: IO [[Int]]
    let minRoute = foldl (calcMinRoute t) (Left "TLE") cts
    either putStrLn (print . head) minRoute
  where

    calcMinRoute :: Int -> Either String [Int] -> [Int] -> Either String [Int]
    calcMinRoute t (Right ct0@[c0, t0]) ct1@[c1, t1] =
        if c1 < c0 && t1 <= t then Right ct1 else Right ct0
    calcMinRoute t (Left tle) ct1@[c1, t1] =
        if t1 <= t then Right ct1 else Left tle