/*
 
dunjen_master
 
*/
 
 

 
#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
 
using namespace std;
 
const int MAX_N = int(1e6) + 10;
const long long int MOD=1e9+7;
const long long int INF=1e18;
 
typedef long long int ll;
typedef unsigned long long int llu;
 
 

inline ll mul(ll a,ll b){

    a=(a+MOD)%MOD;
    b=(b+MOD)%MOD;
    ll c=a*b;
    c=(c+MOD)%MOD;
    return c;
}
inline ll add(ll a,ll b){
    a=(a+MOD)%MOD;
    b=(b+MOD)%MOD;
    ll ans=(a+b);
    ans=(ans+MOD)%MOD;
    return ans;
}
ll power(ll a,ll b,ll c=0){
    ll ans=1;
    while(b){
        if(b&1){
            ans=mul(ans,a);
        }
        a=mul(a,a);
        b=b/2;
    }
    return ans;
}

  

 
#define all(x) (x).begin(),(x).end()

int n,close,open;
vector<pair<int,int> >v;
vector<int>v1;
vector<int>v2;


int main(){


   cin>>n;
   for(int i=1;i<=n;i++){
    string s;
    cin>>s;
    stack<int>ss;
    int cl=0;
    int op=0;
    for(int j=0;j<s.size();j++){
        if(s[j]=='(')ss.push(j);
        else{
            if(!ss.empty())ss.pop();
            else{
                cl++;
            }
        }
    }

    if(cl>0 && !ss.empty()){
        v.push_back(make_pair(cl,(int)ss.size()));
        close+=cl;
        open+=(int)ss.size();
    }else if(cl>0){
        close+=cl;
        v1.push_back(cl);
    }else if(!ss.empty()){
        open+=(int)ss.size();
        v2.push_back((int)ss.size());
    }
   }

   if(close!=open){
    cout<<"No"<<endl;
    return 0;
   }else{
    if(v.size()==0){
        cout<<"Yes"<<endl;
    }else{
        sort(v2.begin(),v2.end());
        reverse(v2.begin(),v2.end());
        if(v2.size()==0){
            cout<<"No"<<endl;
        }else{
            sort(v.begin(),v.end());
            reverse(v.begin(),v.end());
            random_shuffle(v.begin(),v.end());
            vector<pair<int,int> >vv;
            int oo=0;
            for(auto it:v2){
                oo+=it;
                if(v.empty())continue;
                else{
                    auto it2=v.back();
                    if(oo<it2.first){
                        vv.push_back(v.back());
                        v.pop_back();
                        continue;
                    }
                    oo-=it2.first;
                    oo+=it2.second;
                    v.pop_back();
                }
            }

            while(!v.empty()){
                auto it2=v.back();
                if(oo<it2.first){
                    vv.push_back(v.back());
                    v.pop_back();
                    continue;
                }
                oo-=it2.first;
                oo+=it2.second;
                v.pop_back();
            }
            reverse(vv.begin(),vv.end());
            

            for(int k=0;k<=30;k++){
                random_shuffle(vv.begin(),vv.end());
                int x=oo;
                bool f=true;
                for(int j=0;j<vv.size();j++){
                     if(x<vv[j].first){
                        f=false;
                     }
                     x-=vv[j].first;
                     x+=vv[j].second;
                }

                for(auto it:v1){
                    x-=it;
                }

                if(x==0 && f==true){
                    cout<<"Yes"<<endl;
                    return 0;
                }

            }
            cout<<"No"<<endl;
        }

    }
   }
    

    
}

    

    
 
    



Measured memory_bytes: 7320