#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/stack:512000000")
#include<utility>
#include<iostream>
#include<fstream>
#include<vector>
#include<array>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<ctime>
#include<functional>
#include<random>
#include<climits>
#include<queue>
#include<stack>
#include<deque>
#include<bitset>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<cassert>
#include<ccomplex>

#ifdef ONLINE_JUDGE
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("unroll-loops")
#define int128 __int128
#else
#define int128 long long
#endif

#define all(x) x.begin(), x.end()
#define mp make_pair
#define X first
#define Y second

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;
mt19937_64 gen(time(nullptr));

ll mod = 1e9 + 7;

namespace {
	ll mul(ll a, ll b) {
		ll val = a * b - (ll)((ld)a * b / mod) * mod;
		if (val < 0) val += mod;
		if (val >= mod) val -= mod;
		return val;
	}
	ll poww(ll a, ll b) {
		ll val = 1;
		a %= mod;
		while (b > 0) {
			if (b % 2) val = mul(a, val);
			a = mul(a, a);
			b >>= 1;
		}
		return val % mod;
	}
	ll inv(ll a) {
		return poww(a, mod - 2);
	}
}

ll const maxn = 3e5 + 5;

unordered_map<ll, vector<pair<ll, ll>>> mapa, mapa1;

signed main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	//freopen("output.txt", "w", stdout);

	ll n; cin >> n;
	ll sum = 0;

	set <pair<ll, ll>, greater<pair<ll,ll>>>  st, st1;
	vector<string>ss(n);

	for (ll i = 0; i < n; i++) {
		string s;
		cin >> s; ss[i] = s;
		ll sm = 0;
		ll mn = 0;
		for (ll j = 0; j < s.size(); j++) {
			if (s[j] == '(') sm++;
			else sm--;
			mn = min(sm, mn);
		}
		mapa[mn].push_back({ sm,i });
		if (mn >= 0) st.insert({ sm,i });

		sum += sm;
		ll mn1 = 0;
		sm = 0;
		for (ll j = (ll)s.size() - 1; j >= 0; j--) {
			if (s[j] == '(') sm--;
			else sm++;
			mn1 = min(sm, mn1);
		}		
		mapa1[mn1].push_back({ sm,i });
		if (mn1 >= 0) st1.insert({ sm, i });

	}
	if (sum != 0) {
		cout << "No";
		return 0;
	}
	
	unordered_set<ll> used;
	vector<ll>ans(n);

	sum = 0;
	ll cur = 0;
	ll i = 0, j = n - 1;
	// 0
	while (!st.empty()) {
		auto p = *st.begin();
		st.erase(st.begin());
		ll x = p.X, id = p.Y;
		if (x < 0) break;
		if (used.count(id)) continue;
		else used.insert(id);
		ans[i++] = id;
		sum += x;
		assert(sum >= 0);
		ll cur1 = min(cur, -sum);
		for (ll i = cur - 1; i >= cur1; i--) {
			for (auto x : mapa[i]) {
				st.insert(x);
			}
		}
		cur = cur1;
	}


	// 1
	cur = 0; sum = 0;
	while (!st1.empty()) {
		auto p = *st1.begin();
		st1.erase(st1.begin());
		ll x = p.X, id = p.Y;
		if (used.count(id)) continue;
		else used.insert(id);
		ans[j--] = id;
		sum += x;
		assert(sum >= 0);
		ll cur1 = min(cur, -sum);
		for (ll i = cur - 1; i >= cur1; i--) {
			for (auto x : mapa1[i]) {
				st1.insert(x);
			}
		}
		cur = cur1;
	}

	if (i < j) {
		cout << "No";
		return 0;
	}

	string kek = "";
	for (ll id : ans) kek += ss[id];

	sum = 0;
	for (ll i = 0; i < kek.size(); i++) {
		if (kek[i] == '(') sum++;
		else sum--;
		if (sum < 0) {
			cout << "No";
			return 0;
		}
	}

	cout << "Yes\n";

	return 0;
}

/*

*/


Measured memory_bytes: 235056