data Path = Path { cost :: Int, time :: Int }
readPath :: String -> Path
readPath s = let [a,b] = map read . words $ s
                 in Path a b

solve :: Int -> [Path] -> String
solve t ps = case filter ((<=t) . time) ps of
                [] -> "TLE"
                pp -> show . minimum . map cost $ pp


main = do
    [_,t] <- map read . words <$> getLine
    putStrLn . solve t . map readPath . lines =<< getContents