#include<bits/stdc++.h>
#define ALL(c) begin(c), end(c)
using namespace std;
using ll = long long;
using ld = long double;

const int N = 1e6+6;


int main(){
	//freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout);
	ios::sync_with_stdio(0);cin.tie(0);//cout.precision(12);cout<<fixed;
	
	int n;
	
	cin>>n;
	vector<string> s(n);
	for(auto &_ : s) cin>>_;
	
	vector<int> a(n), b(n), p(n);
	for(int i=0;i<n;++i){
		p[i] = i;
		int c = 0, m = 0;
		for(char ch : s[i]){
			if(ch=='(') ++c;
			else --c;
			m = min(m,c);
		}
		a[i] = c;
		b[i] = -m;
	}
	
	sort(ALL(p), [&](int i, int j){
		if(a[i]>=0){
			if(a[j]<0) return true;
			return b[i]<b[j] || b[i]==b[j]&&a[i]>a[j];
		}else{
			if(a[j]>=0) return false;
			return a[i]+b[i]>a[j]+b[j];
		}
	});
	
	
	int cur = 0;

	for(auto i : p){
		//cout<<cur<<' '<<-t.first<<' '<<t.second<<endl;
		if(cur<b[i]){
			cout<<"No";
			return 0;
		}
		cur+=a[i];
	}
	
	cout<<(cur == 0 ? "Yes" : "No")<<endl;
	
	return 0;
}
