#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#define rep(i,k,n) for(int (i)=(k);(i)<(n);(i)++)
#define max(a,b) (a)>(b)?(a):(b)
#define min(a,b) (a)<(b)?(a):(b)
#define abs(a) (a)>0 ?(a):-(a)
#define llong long long

struct pair{ int cnt; int min; };

int pair_compare(const void *a,const void *b){
	struct pair *a0 = a,*b0 = b;
	return b0->cnt - a0->cnt;
}

int main(){
	int N; scanf("%d",&N);
	struct pair S[N];
	rep(i,0,N){
		char s[100010]; scanf("%s",s);
		(S+i)->cnt = 0; (S+i)->min = 100010;
		for(int j=0;s[j]!=0;j++){
			if( s[j]=='(' ) (S+i)->cnt++;
			else (S+i)->cnt--;
			(S+i)->min = min( (S+i)->min,(S+i)->cnt );
		}
	}
	qsort(S,N,sizeof(S[0]),pair_compare);
	int cnt=0;
	int flag[N]; rep(i,0,N) flag[i]=1;
	rep(i,0,N){
		rep(j,0,N){
			if( flag[j]==0 ) continue;
			if( (S+j)->min + cnt < 0 ){
				if( j==N-1 ){
					printf("No");
					return 0;
				}else continue;
			}
			cnt += (S+j)->cnt;
		}
	}
	if( cnt==0 ) printf("Yes");
	else printf("No");
	return 0;
}
