#include <bits/stdc++.h>
using namespace std;
using P = pair<int,int>;

int main(){
  int n;
  cin >> n;
  priority_queue<P> que1, que2;
  for(int i=0; i<n; ++i){
    string s;
    cin >> s;
    int sz = s.size(), cnt=0, mincnt = 0;
    for(int j=0; j<sz; ++j){
      if(s[j] == '(') ++cnt;
      else{
        --cnt;
        mincnt = min(mincnt, cnt);
      }
    }
    if(cnt >= 0) que1.push(P(mincnt,cnt));
    else que2.push(P(mincnt-cnt, -cnt));
  }
  int t1 = 0;
  while(!que1.empty()){
    int x, y;
    tie(x,y) = que1.top();
    que1.pop();
    if(x+t1 <0){
      cout << "No" << endl;
      return 0;
    }
    t1 += y;
  }
  int t2 = 0;
  while(!que2.empty()){
    int x, y;
    tie(x,y) = que2.top();
    que2.pop();
    if(x+t2 <0){
      cout << "No" << endl;
      return 0;
    }
    t2 += y;
  }
  cout << (t1 == t2 ? "Yes":"No") << endl;
}