#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod=998244353;
const ll maxn=1e6+10;
ll f[maxn];
ll C[30][30];

struct node{
	int x,y;
	bool operator < ( node b ) const { return x-y>b.x-b.y; }
}a[maxn];

char s[maxn];



int main()
{
	int n,right=0,left=0,s0=0,s1=0;
	scanf("%d",&n);
	for( int i=1;i<=n;i++ )
	{
		int l=0,r=0;
		scanf("%s",s+1);
		for( int j=1;s[j];j++ )
		{
			if( s[j]=='(' ) l++;
			else 
			{
				if( l ) l--;
				else r++;
			}		
		}
		if( !l && r ) right+=r;
		else if( l && !r ) left+=l;
		else a[i]=(node){l,r};	
		s0+=l,s1+=r;
	}
	if( s0!=s1 ) 
	{
		puts("No"); 
		return 0;
	}
	sort(a+1,a+1+n);
	for( int i=1;i<=n;i++ )
	{
		if( left<a[i].y )
		{
			puts("No");
			return 0;
		} 
		left-=a[i].y-a[i].x;
	}
	if( left!=right ) puts("No");
	else puts("Yes");
}