import Data.List

--         )   (
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] -> Bool
calc parens =
  l == 0 && r == 0
  where
    (rise, fall) = partition (\(P l r) -> l < r) parens
    riseP = mconcat $ sortOn (\(P l _) -> l) rise
    fallP = mconcat . reverse $ sortOn (\(P _ r) -> r) fall
    P l r = riseP <> fallP

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