#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 by_left(const void* x, const void* y) {
	struct nya a = *(const struct nya*)x, b = *(const struct nya*)y;
	return a.left < b.left ? -1 : a.left > b.left;
}

int by_diff(const void* x, const void* y) {
	struct nya a = *(const struct nya*)x, b = *(const struct nya*)y;
	int as = a.right - a.left, bs = b.right - b.left;
	return as > bs ? -1 : as < bs;
}

int N;
struct nya hoge[1234567];

struct hogeq {
	int qmax;
	struct nya q[1234567];
	int (*cmp)(const void* x, const void* y);
};

void qadjust(struct hogeq* q, int idx) {
	for (;;) {
		int min_idx = idx;
		int i;
		for (i = 1; i <= 2; i++) {
			int cidx = idx * 2 + i;
			if (cidx < q->qmax && q->cmp(&q->q[min_idx], &q->q[cidx]) > 0) min_idx = cidx;
		}
		if (min_idx == idx) {
			if (idx == 0) return;
			idx = (idx - 1) / 2;
		} else {
			struct nya tmp = q->q[idx];
			q->q[idx] = q->q[min_idx];
			q->q[min_idx] = tmp;
			idx = min_idx;
		}
	}
}

void enq(struct hogeq* q, struct nya aaaaa) {
	q->q[(q->qmax)++] = aaaaa;
	qadjust(q, q->qmax - 1);
}

struct nya deq(struct hogeq* q) {
	struct nya aaaaa = {0, 0};
	if (q->qmax <= 0) return aaaaa;
	aaaaa = q->q[0];
	q->q[0] = q->q[--(q->qmax)];
	if (q->qmax > 0) qadjust(q, 0);
	return aaaaa;
}

struct hogeq candidates, candidates_of_candidates;

int main(void) {
	int i;
	int ayaneru = 0;
	int used = 0;
	candidates.cmp = by_diff;
	candidates_of_candidates.cmp = by_left;
	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);
		enq(&candidates_of_candidates, hoge[i]);
	}
	for (;;) {
		int moved = 0;
		while (candidates_of_candidates.qmax > 0 && candidates_of_candidates.q[0].left <= ayaneru) {
			struct nya c = deq(&candidates_of_candidates);
			enq(&candidates, c);
			moved = 1;
		}
		while (candidates.qmax > 0) {
			struct nya c = deq(&candidates);
			if (c.left <= ayaneru) {
				ayaneru -= c.left;
				ayaneru += c.right;
				used++;
				moved = 1;
				break;
			} else {
				enq(&candidates_of_candidates, c);
				moved = 1;
			}
		}
		if (used >= N) {
			puts(ayaneru == 0 ? "Yes" : "No");
			return 0;
		}
		if (!moved) {
			puts("No");
			return 0;
		}
	}
	return 0;
}

/*

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

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

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

-------------

4
(
)))(((((((
)(((
)))))))

*/
