import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    n <- getInt
    ss <- replicateM n $ do
        s <- getLine
        return $ f s
    putStrLn $ if check ss && solve 0 (sort ss) then "Yes" else "No"

f [] = (0,0)
f ('(':ss) = let (l,r) = f ss in if l > 0 then (l-1,r) else (l,r+1)
f (')':ss) = let (l,r) = f ss in (l+1,r)

check ss = any (==0) ss1 && any (==0) ss2 && (sum ss1) - (sum ss2) == 0
    where (ss1,ss2) = unzip ss

solve _ [] = True
solve t ((l,r) : ss) | t >= l = solve (t-l+r) ss
                     | otherwise = False