#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define rep(i,m,n) for(int i=m;i<n;i++)
ll mod=998244353;

int main(){
  int n;
  cin>>n;
  string s[n];
  rep(i,0,n){
    cin>>s[i];
  }
  vector<P> left;
  vector<P> right;
  rep(i,0,n){
    int worst=0;
    int las=0;
    rep(j,0,s[i].size()){
      if(s[i][j]=='(') las++;
      else las--;
      worst=min(worst,las);
    }
    if(las>0){
      left.push_back(P(worst,las));
    }
    else{
      right.push_back(P(worst-las,-las));
    }
  }
  sort(left.begin(),left.end());
  reverse(left.begin(),left.end());
  sort(right.begin(),right.end());
  reverse(right.begin(),right.end());
  bool p=true;
  int curl=0;
  rep(i,0,left.size()){
    if(curl+left[i].first<0){
      p=false;
    }
    curl+=left[i].second;
  }
  int curr=0;
  rep(i,0,right.size()){
    if(curr+right[i].first<0){
      p=false;
    }
    curr+=right[i].second;
  }
  if(p && curl==curr) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}