#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace std;
using namespace __gnu_pbds; 
#define ll          long long int
#define ull         unsigned long long int
#define pb          push_back
#define pii         pair<int,int>
#define F           first
#define S           second
#define vi          vector<int>
#define vli          vector<ll>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define M_PI        3.14159265358979323846
#define mp          make_pair
#define sz(x)       (int)x.size()
#define matrix      vector<vector<ll>>
#define forn(i,a,b)  for(int i=a;i<b;i++)
#define eps 0.0000000001
#define all(a)      (a).begin(),(a).end()
#define ordered_set     tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> 

const long long INF = (long long) 1e11+1;
const long long mod = (long long) 998244353;
const long long hell = (long long) 1000000007;


ll power(ll x,ll y)
{
  ll res=1;
  while(y>0){
    if(y%2) res=(x%mod*res)%mod;
    x=(x%mod*x%mod)%mod;    
    y=y/2;
  }
  return res%mod;
}

ll modinv(ll x){
  return power(x,hell-2);
}


void fastIO() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}

ll gcd(ll a,ll b)
{
    while( b != 0)
	{
		ll  t = b;
		b= a %t;
		a = t;
	}
	return a;
}

bool comp(pair<int,int>& a,pair<int,int>& b){
    int x=a.F-a.S;
    int y=b.F-b.S;
    return x>y;
}
                                                                      
void solve(){  
    int n;
    cin>>n;
    
    vector<string> vec(n);
    forn(i,0,n)
    cin>>vec[i];
    
    int opt=0,clt=0,cop=0,ccl=0;
    vector<pair<int,int>> cur;
    
    forn(i,0,n){
        string s=vec[i];
        int len=s.length();
        int cl=0,op=0;
        stack<int> st;
        
        for(int j=0;j<len;j++){
            if(s[j]=='('){
                st.push(j);
            }else{
                if(st.empty())
                cl++;
                else
                st.pop();
            }
        }
        
        op=st.size();
        
        if(cl==0){
            opt+=op;
        }
        else if(op==0){
            clt+=cl;
        }
        else{
            cur.pb(mp(op,cl));
        }
    }    
    
    sort(all(cur),comp);
    for(auto u:cur){
        
        ccl=ccl+max(u.S-cop,0);
        cop=u.F+max(cop-u.S,0);
    }
    if(ccl>opt){
        cout<<"No";
        return;
    }
    
    opt-=ccl;
    opt+=cop;
    if(opt==clt){
        cout<<"Yes";
    }else
    cout<<"No";
}

int main(){
   fastIO();
   int test;
   //cin>>test;
   test=1;    
   
   while(test--)
   solve();
}

///Before submit=>
///    *check for integer overflow,array bounds
///    *check for n=1

/*
  For freq or prime factors

for(auto pri:prime){
  while(k%pri==0){
    pcnt[pri]++;
    k/=pri;
  }
}*/

// gcd of strings
/*
string getgcd(string s1,string s2){
    
    while(true){
        if(s1.length()<s2.length()){
            swap(s1,s2);
            continue;
        }
        if(s2.empty())
        return s1;
        
        if(s1.substr(0,s2.length())!=s2)
        return "";
        
        s1=s1.substr(s2.length());
    }
}
*/
/*
// for user defined DS hashmap and set
 
struct hash_pair{
      size_t operator()(const pair<int,pair<int,int>>& p) const{
          auto hash1=hash<int>()(p.F) ;
          auto hash2=hash<int>()(p.S.F) ;
          auto hash3=hash<int>()(p.S.S) ;
          return (hash1^hash2)^hash3;
      }  
};
struct pair_hash
{
	template <class T1, class T2>
	std::size_t operator () (std::pair<T1, T2> const &pair) const
	{
		std::size_t h1 = std::hash<T1>()(pair.first);
		std::size_t h2 = std::hash<T2>()(pair.second);

		return h1 ^ h2;
	}
};
*/



Measured memory_bytes: 34616