#include <bits/stdc++.h>
using namespace std;
#define int long long
#define override_rep(i, l, r, mes, ...) mes
#define rep1(i, n) for (int i = 0; i < n; i++)
#define rep2(i, l, r) for (int i = l; i < r; i++)
#define rep(...) override_rep(__VA_ARGS__, rep2, rep1)(__VA_ARGS__)
typedef pair<int,int> P;
template<typename T, typename U>
istream& operator>>(istream& in, pair<T, U>& p) {
	in >> p.first >> p.second;
	return in;
}
template<int64_t MOD>
class ModInt {
	typedef int64_t T;
	T x;

  public:
	ModInt(){
		x=0;
	}

	ModInt(T value) {
		if (value < 0) value = (MOD - (-value) % MOD);
		x = value % MOD;
	}

	ModInt operator-() const {
		return ModInt(-x);
	}

	ModInt& operator+=(const ModInt& p) {
		if ((x += p.get()) >= MOD) x -= MOD;
		return *this;
	}

	ModInt& operator-=(const ModInt& p) {
		if ((x += MOD - p.get()) >= MOD) x -= MOD;
		return *this;
	}

	ModInt& operator*=(const ModInt& p) {
		x = x * p.get() % MOD;
		return *this;
	}

	ModInt& operator/=(const ModInt& p) {
		*this *= p.inverse();
		return *this;
	}

	ModInt& operator+=(const T& p) {
		return *this += ModInt(p);
	}

	ModInt& operator-=(const T& p) {
		return *this -= ModInt(p);
	}

	ModInt& operator*=(const T& p) {
		return *this *= ModInt(p);
	}

	ModInt& operator/=(const T& p) {
		return *this /= ModInt(p);
	}

	ModInt operator+(const ModInt& p) const {
		return ModInt(*this) += p;
	}

	ModInt operator-(const ModInt& p) const {
		return ModInt(*this) -= p;
	}

	ModInt operator*(const ModInt& p) const {
		return ModInt(*this) *= p;
	}

	ModInt operator/(const ModInt& p) const {
		return ModInt(*this) /= p;
	}

	ModInt operator+(const T& p) const {
		return ModInt(*this) += p;
	}

	ModInt operator-(const T& p) const {
		return ModInt(*this) -= p;
	}

	ModInt operator*(const T& p) const {
		return ModInt(*this) *= p;
	}

	ModInt operator/(const T& p) const {
		return ModInt(*this) /= p;
	}

	bool operator==(const ModInt& p) const {
		return x == p.get();
	}

	bool operator!=(const ModInt& p) const {
		return x != p.get();
	}

	bool operator==(const T& p) const {
		return x == ModInt(p);
	}

	bool operator!=(const T& p) const{
		return x != ModInt(p);
	}

	ModInt inverse() const {
		int a = x, b = MOD, u = 1, v = 0;
		while (b) {
			int t = a / b;
			a -= t * b;
			u -= t * v;
			swap(a, b);
			swap(u, v);
		}
		return ModInt(u);
	}

	T get() const{
		return x;
	}

	friend ostream& operator<<(ostream& out,const ModInt& value){
	    out<<value.x;
	    return out;
	}
};
signed main(signed argc, char* argv[]) {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	const int MOD = 998244353;
	int n;
	cin>>n;
	vector<P> s(n);
	rep(i,n){
		string in;
		cin>>in;
		int cnt=0,left=0;
		rep(j,in.size()){
			if(in[j]==')')cnt++;
			else cnt--;
			left=max(cnt,left);
		}
		cnt=0;int right=0;
		reverse(in.begin(),in.end());
		rep(j,in.size()){
			if(in[j]==')')cnt--;
			else cnt++;
			right=max(cnt,right);
		}
		s[i]={left,right};

	}
	sort(s.begin(),s.end(),[](P a,P b){
		if(a.second!=b.second)return a.second<b.second;
		return a.first>b.first;
	});
	P right=s[0];
	reverse(s.begin(),s.end());
	s.pop_back();
	sort(s.begin(),s.end());
	auto f=[](P a,P b)->bool{
	  if(a.second!=b.second)return a.second<b.second;
	  return a.first>b.first;
	};
	priority_queue<P,vector<P>,decltype(f)> que{f};
	int cnt=0,idx=0;
	rep(i,n-1){
		while((idx!=n-1&&s[idx].first<=cnt)||idx<=i){
			que.push(s[idx]);
			idx++;
		}
		P it=que.top();que.pop();
		cnt-=it.first;
		if(cnt<0){
			cout<<"No"<<endl;
			return 0;
		}
		cnt+=it.second;
	}
	cnt-=right.first;
	if(cnt<0){
		cout<<"No"<<endl;
		return 0;
	}
	cnt+=right.second;
	if(cnt!=0)cout<<"No"<<endl;
	else cout<<"Yes"<<endl;
}


Measured memory_bytes: 35300