import Control.Applicative ((<|>))

calc :: Int -> Int -> Int -> Maybe Int
calc mT c t
  | mT < t = Nothing
  | otherwise = Just c

choose :: Maybe Int -> Maybe Int -> Maybe Int
choose (Just a) (Just b) = Just $ min a b
choose a b = a <|> b

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

main = do
  (n, mt) <- parse
  paths <- sequence $ replicate n parse
  let a  = foldr1 choose $ map (uncurry (calc mt)) paths
  case a of
    Nothing -> putStrLn "TLE"
    Just c -> print c

