//by szh
#include<bits/stdc++.h>
using namespace std;
 
#define pb push_back
#define fi first
#define SZ(x) (int((x).size()))
#define se second
#define ll long long
#define pq priority_queue
#define MP make_pair
#define pii pair<int,int>
#define mod 998244353
#define inf 0x3f3f3f3f
#define debug(x) cerr<<#x<<"="<<x<<'\n'
#define rep(i, a, b) for (int i=a; i<(b); i++)
 
const int maxn=1e6+10;
 
int n;
pii a[maxn];
 
bool cmp(pii x,pii y) {
	return (x.se>y.se||y.fi<0)&&(y.se-y.fi>x.se-x.fi||x.fi>0);
}
 
int main(){
    std::ios::sync_with_stdio(false);
    cin>>n;
    rep(i,0,n) {
    	string s;
    	cin>>s;
    	int mn=mod,val=0; 
    	rep(j,0,SZ(s)) {
    		if (s[j]=='(') val++;
    		else val--;
    		mn=min(val,mn);
		}
		a[i]=MP(val,mn);
	}
	sort(a,a+n,cmp);
	int sum=0;
	rep(i,0,n) {
		if (sum+a[i].se<0) {
			cout<<"No";
			return 0;
		}
		sum+=a[i].fi; 
	}
	if (sum==0) cout<<"Yes";
	else cout<<"No";
	return 0;
}