#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
	int N;
	cin >> N;
	vector<string> Si(N);
	for (int n = 0; n < N; n++) {
		cin >> Si[n];
	}
	vector<pair<int, int>> up, down;
	for (int n = 0; n < N; n++) {
		int h = 0, b = 0;
		for (int i = 0; i < Si[n].size(); i++) {
			if (Si[n][i] == '(') {
				h++;
			}
			else if (Si[n][i] == ')') {
				h--;
			}
			else {
				break;
			}
			b = min(b, h);
		}
		if (h >= 0) {
			up.emplace_back(b, h);
		}
		else {
			down.emplace_back(b - h, h);
		}
	}
	sort(up.rbegin(), up.rend());
	sort(down.begin(), down.end());
	int h = 0;
	for (int i = 0; i < up.size(); i++) {
		if (h + up[i].first < 0) {
			cout << "No" << endl;
			return 0;
		}
		h += up[i].second;
	}
	for (int i = 0; i < down.size(); i++) {
		if (h + down[i].first + down[i].second < 0) {
			cout << "No" << endl;
			return 0;
		}
		h += down[i].second;
	}

	if (h == 0) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}