#include <bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL); 

#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define mp make_pair
#define in insert
#define ld long double


#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...) 1
#endif
template<class T> ostream& operator<<(ostream &os, vector<T> V) {os << "[ "; for(auto v : V) os << v << " "; return os << "]";}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {return os << "(" << P.first << "," << P.second << ")";}
template <typename T,typename U>pair<T,U> operator+(const pair<T,U> & l,const std::pair<T,U> & r) { return {l.first+r.first,l.second+r.second};}
typedef long long int ll;
#define int ll
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
const ll mod =1e18;
const ll MAX_NODES =200001;
const ll MAX_LOG =50;
const ll maxn = 400000+1;
int bal(string s){
  int bal = 0;
  for(auto i:s)
      if(i =='(')
        bal++;
      else
      {
        bal--;
      }
    return bal;
      
}
int minim(string s){
  int bal = 0,minim = 1e9;
  for(auto i:s){
      if(i =='(')
        bal++;
      else
      {
        bal--;
      }
      minim = min(minim,bal);
      }
    return minim;
  
}
bool comp(pair<int,int> a,pair<int,int> b){
  return (a.second-a.first == b.second - b.first)?(a.second>b.second):(a.second-a.first > b.second - b.first);
}
int32_t main()
{ 
  #ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif
  IOS 
  int n;
  cin>>n;
  string s[n];
  int tot = 0;
  vector<pair<int,int>> v,v1;
  for(int i = 0;i<n;i++){
    cin>>s[i];
    tot+=bal(s[i]);
    if(bal(s[i])>=0)
    v.pb({minim(s[i]),bal(s[i])});
    else
    {
      v1.push_back({minim(s[i]),bal(s[i])});
    } 
  }
  if(tot!=0){
    cout<<"No"<<endl;
    return 0;
  }
  sort(v.begin(),v.end(),greater<pair<int,int>>());
  sort(v1.begin(),v1.end(),greater<pair<int,int>>());
  //cout<<v<<endl;
  int bal = 0;
  for(int i = 0,j = 0;i<v.size();i = j){
    int tempbal = 0;
    while(j<v.size() and v[j].first>=(-bal))
      {
        tempbal+=v[j].second;
        j++;
      }
    //trace(j);
    bal+=tempbal;
    if(i == j){
      cout<<"No"<<endl;
      return 0;
    }
  }
  for(int i = 0,j = 0;i<v1.size();i = j){
    vector<pair<int,int>> temp;
    while(j<v1.size() and v1[j].first>=(-bal))
      {
        temp.push_back(v1[j]);
        j++;
      }
      if(i == j){
        cout<<"No"<<endl;
        return 0;
      }
    sort(temp.begin(),temp.end(),comp);
    for(int k = 0;k<temp.size();k++){
      if(temp[k].first+bal<0){
        cout<<"No"<<endl;
        return 0;
      }
      bal+=temp[k].second;
    }
  }
  cout<<"Yes"<<endl;
  

  




}


Measured memory_bytes: 62360