#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
int N;
vector<pair<int,int> >pls,mins;
int main()
{
	cin>>N;
	for(int i=0;i<N;i++)
	{
		string s;cin>>s;
		int mn=0,cnt=0;
		for(int j=0;j<s.size();j++)
		{
			if(s[j]=='(')cnt++;
			else cnt--;
			if(mn>cnt)mn=cnt;
		}
		if(cnt>=0)pls.push_back(make_pair(cnt,mn));
		else mins.push_back(make_pair(cnt,mn));
	}
	priority_queue<pair<int,int> >P;
	int now=0;
	for(pair<int,int>p:pls)
	{
		P.push(make_pair(p.second,p.first));
		while(!P.empty()&&now+P.top().first>=0)
		{
			now+=P.top().second;
			P.pop();
		}
	}
	if(!P.empty())
	{
		cout<<"No"<<endl;
		return 0;
	}
	sort(mins.begin(),mins.end(),[](pair<int,int>a,pair<int,int>b)
	{
		return a.second-a.first<b.second-b.first;
	});
	for(pair<int,int>p:mins)
	{
		if(now+p.second<0)
		{
			cout<<"No"<<endl;
			return 0;
		}
		now+=p.first;
	}
	cout<<(now==0?"Yes":"No")<<endl;
}
