import qualified Data.ByteString.Char8 as BS
import qualified Data.List as L
import qualified Data.Set as S
import qualified Control.Monad as M
import Data.Maybe (fromJust)
import Data.Ord
import qualified Data.Vector.Unboxed as V

comb :: Int -> [a] -> [[a]]
comb 0 xs = [[]]
comb _ [] = []
comb n (x:xs) = [x:y | y <- comb (n-1) xs] ++ comb n xs


shori tsumi now [] = filter (0/=) [tsumi,now]
shori tsumi now (x:xs)
 |x<0&&now+x<0 = shori (now+x) 0 xs
 |x<0&&now+x>=0 = shori tsumi (now+x) xs
 |otherwise =shori tsumi (now+x) xs


msho [a] = [a]
msho [a,b]
 | a<0&&b<0 = [a+b]
 | otherwise = [a,b]

lae x y [] = (x,y)
lae x y ([a,b]:xs)
 |y<(-a) = lae (x-(y+a)) b xs
 |otherwise = lae x (y+a+b) xs

main = do
 n <- readLn :: IO Int
 str <-map (map (\x->if (BS.head x) == '(' then BS.length x else negate (BS.length x)) )<$>map BS.group <$>M.replicateM n BS.getLine
 let gatch = map msho$filter (not.null)$ map (shori 0 0 ) str


 let one = sum $map (\[x]->x)$ filter (\x->length x == 1) gatch
 let two = filter (\x->length x /= 1) gatch
 let allpat = filter ("Yes"==)$map (hyoka one)$map (lae 0 0)$ comb (length two) two
 putStrLn $ if length allpat /=0
  then "Yes"
  else "No"
--
--
hyoka one (resa,resb)
 |one /=0 && (resa==0||resb==0)="No"
 |one ==0 && (resa/=0||resb/=0)="No"
 |one == 0&&resa==0&&resb ==0 = "Yes"
 |one <0 && resa>0 = "No"
 |one <0 && resa==0&&resb+one==0="Yes"
 |one >0 && resb>0 = "No"
 |one >0 && resb==0&&resa - one == 0= "Yes"
