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

void neko(int* left, int* right, const char* data) {
	size_t s = strlen(data);
	size_t i;
	int count = 0;
	int foo = 0;
	for (i = 0; i < s; i++) {
		if (data[i] == '(') count++;
		else if (data[i] == ')') count--;
		if (count < foo) foo = count;
	}
	*left = -foo;

	foo = 0;
	count = 0;
	for (i = s; i > 0; i--) {
		if (data[i - 1] == '(') count++;
		else if (data[i - 1] == ')') count--;
		if (count > foo) foo = count;
	}
	*right = foo;
}

char S[1234567];

struct nya {
	int left, right;
};

int donyoku(const void* x, const void* y) {
	struct nya a = *(const struct nya*)x, b = *(const struct nya*)y;
	int sa = a.right - a.left, sb = b.right - b.left;
	if (a.left == 0 && b.left > 0) return -1;
	if (a.left > 0 && b.left == 0) return 1;
	return sa > sb ? -1 : sa < sb;
}

int N;
struct nya hoge[1234567];

int main(void) {
	int i;
	int ayaneru = 0;
	if (scanf("%d", &N) != 1) return 1;
	for (i = 0; i < N; i++) {
		if (scanf("%1234566s", S) != 1) return 1;
		neko(&hoge[i].left, &hoge[i].right, S);
	}
	qsort(hoge, N, sizeof(*hoge), donyoku);
	for (i = 0; i < N; i++) {
		ayaneru -= hoge[i].left;
		if (ayaneru < 0) {
			puts("No");
			return 0;
		}
		ayaneru += hoge[i].right;
	}
	puts(ayaneru == 0 ? "Yes" : "No");
	return 0;
}

/*

1 ())()()(()(()() 2

差に基づく貪欲はこれでダメ

3
(((
)))(((((((
)))))))

*/
