// Problem : F - Bracket Sequencing
// Contest : AtCoder - AtCoder Beginner Contest 167
// URL : https://atcoder.jp/contests/abc167/tasks/abc167_f
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include<bits/stdc++.h>
using namespace std;

void throwNotImplementedException() {
	throw "Not implemented";
}
	

#define ii pair<int, int>
const int N = 1e6 + 5;

	int n;
	string s[N];
	int L, R;
	vector<ii> mids;
	string ans;

	ii simplify(string &str) {
		ii res(0, 0);
		int len = str.length();
		for (int i = 0; i < len; i++) {
			if (str[i] == ')') {
				if (res.second) {
					res.second--;
				} else {
					res.first++;
				}
			} else {
				res.second++;
			}
		}
		return res;
	}

	void input() {
		// throwNotImplementedException();
		cin >> n;
		for (int i = 0; i < n; i++) {
			cin >> s[i];
			// cout << s[i] << "\n";
		}
	} 
	
	string wrongFirstAttempt() {
		int M1, M2;
		M1 = M2 = 0;
		for (auto mid : mids) {
			M1 += mid.first;
			M2 += mid.second;
		}
		return (L >= M1 && M2 <= R && L - M1 + M2 - R == 0 ? "Yes" : "No");
	}
	
	void f(ii* mid, int &M1, int &M2) {
		int m1a, m2a, m1b, m2b;
		m1a = m2a = m1b = m2b = 0;
		m1a += M1;
		m2a = M2 - mid->first;
		if (m2a < 0) {
			m1a -= m2a;
			m2a = 0;
		}
		m2a += mid->second;
		m1b = M1 - mid->second;
		if (m1b < 0) {
			m2b -= m1b;
			m1b = 0;
		}
		m1b += mid->first;
		m2b += M2;
		if (m1a <= m1b && m2a <= m2b) {
			M1 = m1a, M2 = m2a;
		} else if (m1a >= m1b && m2a >= m2b) {
			M1 = m1b, M2 = m2b;
		} else {
			throw "WHY???";
		}
	}

	bool comp(ii &p1, ii &p2) {
		if (p1.first != p2.first) {
			return p1.first < p2.first;
		}
		return p1.second > p2.second;
	}

	string wrongGreedy() {
		int M1, M2;
		M1 = M2 = 0;
		for (auto mid : mids) {
			f(&mid, M1, M2);
		}
		if (L >= M1 && M2 <= R && L - M1 + M2 - R == 0) return "Yes"; 
		sort(mids.begin(), mids.end(), comp);
		M1 = M2 = 0;
		for (auto mid : mids) {
			f(&mid, M1, M2);
		}
		return (L >= M1 && M2 <= R && L - M1 + M2 - R == 0 ? "Yes" : "No");
	}
	
	class T
	{
	public:
		int index;
		ii* p;
		T(int index, ii* p) : index(index), p(p) {}
	};
	
	class CompareFirst
	{
	public:
	    bool operator() (T t1, T t2)
	    {
	        if (t1.p->first != t2.p->first) {
				return t1.p->first < t2.p->first;
			}	    	
			if (t1.p->second != t2.p->second) {
				return t1.p->second < t2.p->second;
			}	    	
			return t1.index < t2.index;
	    }
	};
	
	class CompareSecond
	{
	public:
	    bool operator() (T t1, T t2)
	    {
			if (t1.p->second != t2.p->second) {
				return t1.p->second < t2.p->second;
			}		    	
	        if (t1.p->first != t2.p->first) {
				return t1.p->first < t2.p->first;
			}	    		
			return t1.index < t2.index;	        
	    }
	};

	bool used[N];
	
	string greedy2() {
		priority_queue<T, vector<T>, CompareFirst> pq1;
		priority_queue<T, vector<T>, CompareSecond> pq2;
		int sz = mids.size();
		for (int i = 0; i < sz; i++) {
			T t(i, &mids[i]);
			pq1.push(t);
			pq2.push(t);
		}
		int M1, M2;
		M1 = M2 = 0;
		while (pq1.size() and pq2.size()) {
			T t1 = pq1.top();
			used[t1.index] = true;
			while (pq1.size() and used[pq1.top().index]) {
				pq1.pop();
			}
			T t2 = pq2.top();
			used[t2.index] = true;
			while (pq2.size() and used[pq2.top().index]) {
				pq2.pop();
			}
			if (t1.index == t2.index) {
								
			}
		}
		return (L >= M1 && M2 <= R && L - M1 + M2 - R == 0 ? "Yes" : "No");
	}

	//string dp() {}
	
	void solve() {
		// throwNotImplementedException();
		L = R = 0;
		for (int i = 0; i < n; i++) {
			ii p = simplify(s[i]);
			if (p.first == 0) {
				L += p.second;
			} else if (p.second == 0) {
				R += p.first;
			} else {
				mids.push_back(p);
			}
		}
		ans = wrongGreedy();
		//ans = greedy2();
		//ans = dp();
	}
	
	void output() {
		// throwNotImplementedException();
		cout << ans << "\n";
	}

int main() {
	ios_base::sync_with_stdio(0), cin.tie(0);
	input();
	solve();
	output();
	//cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
	return 0;
}


Measured memory_bytes: 36608