import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    [n, m] <- fmap read . words <$> getLine :: IO [Int]
    as <- replicateM n $ do
        [c, t] <- fmap read . words <$> getLine :: IO [Int]
        return (c, t)
    let bs = sortOn fst as
    let cs = dropWhile (\(a, b) -> b > m) bs
    if null cs
        then putStrLn "TLE"
        else print $ fst $ head cs