import Control.Monad

type Path = (Int, Int)

main :: IO ()
main = do
  (n, t) <- readPair
  pathes <- replicateM n readPair
  putStrLn $ maybe "TLE" show $ solve t pathes

readPair :: IO (Int, Int)
readPair = do
  [a, b] <- map read . words <$> getLine
  return (a, b)

solve :: Int -> [Path] -> Maybe Int
solve t pathes = case [ cost path | path <- pathes, time path <= t ] of
  [] -> Nothing
  xs -> Just $ minimum xs

cost :: Path -> Int
cost = fst

time :: Path -> Int
time = snd
