#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <string>

using namespace std;

#define LL long long

const int dx[4] = {1, -1, 0, 0};
const int dy[4] = {0, 0, 1, -1};

LL mod(LL x, LL md) {
	return ((x % md) + md) % md;
}

class Mint {
public:
	static LL md;
	LL x;
	Mint(LL _x) {
		x = mod(_x, md);
	}
	Mint(const Mint &y) {
		x = mod(y.x, md);
	}
};

void MintMyExgcd(LL a, LL b, LL &x, LL &y) {
	// solve equation ax + by = 1 (mod m)
	LL md = Mint::md;
	if (b == 0) {
		y = 0;
		x = 1;
		return ;
	}
	MintMyExgcd(b, a % b, x, y);
	LL t = y;
	y = mod(x - (a / b) * y, md);
	x = t;
}

LL MintNY(LL x) {
	if (x == 0) {
		return 1;
	}
	LL md = Mint::md;
	LL a, b;
	MintMyExgcd(x, md, a, b);
	while (a < 0) {
		a += md;
	}
	return a;
}

/* LL gcd(LL a, LL b) {
	if (b == 0) {
		return a;
	}
	return gcd(b, a % b);
} */

Mint operator+(Mint a, Mint b) {
	return Mint(mod(a.x + b.x, Mint::md));
}
Mint operator-(Mint a, Mint b) {
	return Mint(mod(a.x - b.x, Mint::md));
}
Mint operator*(Mint a, Mint b) {
	return Mint(mod(a.x * b.x, Mint::md));
}
Mint operator/(Mint a, Mint b) {
	Mint c = Mint(MintNY(b.x));
	return Mint(mod(a.x * c.x, Mint::md));
}

Mint operator-(Mint a) {
	return Mint(-a.x);
}
bool operator==(Mint a, Mint b) {
	return a.x == b.x;
}
bool operator!=(Mint a, Mint b) {
	return a.x != b.x;
}
bool operator>(Mint a, Mint b) {
	return a.x > b.x;
}
bool operator<(Mint a, Mint b) {
	return a.x < b.x;
}
bool operator>=(Mint a, Mint b) {
	return a.x >= b.x;
}
bool operator<=(Mint a, Mint b) {
	return a.x <= b.x;
}

void operator+=(Mint &a, Mint b) {
	a = a + b;
}
void operator-=(Mint &a, Mint b) {
	a = a - b;
}
void operator*=(Mint &a, Mint b) {
	a = a * b;
}
void operator/=(Mint &a, Mint b) {
	a = a / b;
}

ostream& operator<<(ostream &out, Mint a) {
	out << a.x;
	return out;
}

istream& operator>>(istream &in, Mint &a) {
	in >> a.x;
	return in;
}

Mint factorial(LL n) {
	if (n == 0) {
		return Mint(1);
	}
	Mint res = 1;
	for (LL i = 1; i <= n; ++i) {
		res *= i;
	}
	return res;
}
Mint multiRange(LL s, LL t) {
	Mint res = 1;
	for (LL i = s; i <= t; ++i) {
		res *= i;
	}
	return res;
}

Mint getC(LL n, LL k) {
	if (n - k < k) {
		return getC(n, n - k);
	}
	return multiRange(n - k + 1, n) / factorial(k);
}

Mint getA(LL n, LL k) {
	return multiRange(n - k + 1, n);
}

Mint countNonNegativeDivision(LL n, LL k) {
	return getC(n + k - 1, k - 1);
}
Mint countPositiveDivision(LL n, LL k) {
	if (n < k) {
		return 0;
	}
	if (k <= 0) {
		return 0;
	}
	return getC(n - 1, k - 1);
}
Mint quickMod(Mint a, LL b) {
	Mint res = 1;
	while (b > 0) {
		if (b % 2) {
			res *= a;
		}
		a *= a;
		b /= 2;
	}
	return res;
}

LL Mint::md = 1000000007;

int maxR(string &s) {
	int ct = 0;
	int res = 0;
	for (int i = 0; i < s.length(); ++i) {
		if (s[i] == '(') {
			ct -= 1;
		} else {
			ct += 1;
			res = max(res, ct);
		}
	}
	return res;
}
int deltaL(string &s) {
	int ct = 0;
	for (int i = 0; i < s.length(); ++i) {
		if (s[i] == '(') {
			ct += 1;
		} else {
			ct -= 1;
		}
	}
	return ct;
}

int n;
vector<string> ss;

string getS() {
	char c = getchar();
	while (c != '(' && c != ')') {
		c = getchar();
	}
	string res = "";
	while (c == '(' || c == ')') {
		res.push_back(c); 
		c = getchar();
	}
	return res;
}

class Str {
	public:
	int mr, dl;
	Str(int _mr, int _dl): mr(_mr), dl(_dl) {}
};

bool cmp(const Str &a, const Str &b) {
	return a.dl + a.mr > b.dl + b.mr;
}

int main() {
	cin >> n;
	int tl = 0;
	string s;
	for (int i = 0; i < n; ++i) {
		ss.push_back(getS());
		// cin >> s;
		// ss.push_back(s);
		tl += ss[i].length();
	}
	vector<vector<int> > dls;
	dls.clear();
	for (int i = 0; i <= tl; ++i) {
		dls.push_back(vector<int>());
	}
	for (int i = 0; i < n; ++i) {
		int mr, dl;
		mr = maxR(ss[i]);
		dl = deltaL(ss[i]);
		// cout << "mr = " << mr << ", dl = " << dl << " of " << ss[i] << endl;
		dls[mr].push_back(dl);
		// s.push_back(Str(mr, dl));
	}
	int cur = 0;
	int curD = 0;
	int considered = 0;
	// cout << dls.size() << endl;
	while (cur < dls.size()) {
		// cout << "cur = " <<./ cur << ", curD = " << curD << endl;
		if (dls[cur].size() == 0) {
			++cur;
			continue;
		}
		if (curD < cur) {
			cout << "No" << endl;
			return 0;
		}
		// sort(dls[cur].begin(), dls[cur].end());
		// considered += dls[cur].size();
		for (int i = 0; i < dls[cur].size(); ++i) {
			if (dls[cur][i] >= 0) {
				curD += dls[cur][i];
			}
		}
		cur += 1;
	}
	vector<Str> sss;
	for (int cur = dls.size() - 1; cur >= 0; --cur) {
		if (dls[cur].size() == 0) {
			continue;
		}
		for (int i = dls[cur].size() - 1; i >= 0; --i) {
			if (dls[cur][i] < 0) {
				/* if (curD < cur) {
					cout << "No" << endl;
					return 0;
				}
				curD += dls[cur][i]; */
				sss.push_back(Str(cur, dls[cur][i]));
			}
		}
	}
	sort(sss.begin(), sss.end(), cmp);
	for (int i = 0; i < sss.size(); ++i) {
		if (curD < sss[i].mr) {
			cout << "No" << endl;
			return 0;
		} else {
			curD += sss[i].dl;
		}
	}
	if (curD == 0) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}
	return 0;
}

Measured memory_bytes: 82404