import Control.Monad
import Data.List
import Data.Maybe
import Data.Ord

--         )   (
data P = P Int Int deriving (Show)

instance Semigroup P where
  (P l1 r1) <> (P l2 r2)
    | r1 < l2 = P (l1 + l2 - r1) r2
    | otherwise = P l1 (r1 + r2 - l2)

instance Monoid P where
  mempty = P 0 0

parseC :: Char -> P
parseC '(' = P 0 1
parseC ')' = P 1 0

parse :: String -> P
parse = mconcat . map parseC

calc :: [P] -> Maybe ()
calc parens = do
  res <- foldM f mempty $ sortOn (\(P l _) -> l) rise
  P l r <- foldM f res . reverse $ sortOn (\(P _ r) -> r) fall
  if l == 0 && r == 0
    then Just ()
    else Nothing
  where
    (rise, fall) = partition (\(P l r) -> l < r) parens
    good (P a _) = a >= 0
    f accum x = if good accum then Just $ accum <> x else Nothing

main :: IO ()
main = do
  n <- read <$> getLine
  res <- fmap calc . sequenceA $ replicate n (fmap parse getLine)
  putStrLn $ if isJust res then "Yes" else "No"