#pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
void *wmem;
char memarr[96000000];
template<class T> inline void walloc1d(T **arr, int x, void **mem = &wmem){
  static int skip[16] = {0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
  (*mem) = (void*)( ((char*)(*mem)) + skip[((unsigned long long)(*mem)) & 15] );
  (*arr)=(T*)(*mem);
  (*mem)=((*arr)+x);
}
template<class T1> void sortA_L(int N, T1 a[], void *mem = wmem){
  sort(a, a+N);
}
template<class T1, class T2> void sortA_L(int N, T1 a[], T2 b[], void *mem = wmem){
  int i;
  pair<T1, T2> *arr;
  walloc1d(&arr, N, &mem);
  for(i=(0);i<(N);i++){
    arr[i].first = a[i];
    arr[i].second = b[i];
  }
  sort(arr, arr+N);
  for(i=(0);i<(N);i++){
    a[i] = arr[i].first;
    b[i] = arr[i].second;
  }
}
template<class T1, class T2, class T3> void sortA_L(int N, T1 a[], T2 b[], T3 c[], void *mem = wmem){
  int i;
  pair<T1, pair<T2, T3> > *arr;
  walloc1d(&arr, N, &mem);
  for(i=(0);i<(N);i++){
    arr[i].first = a[i];
    arr[i].second.first = b[i];
    arr[i].second.second = c[i];
  }
  sort(arr, arr+N);
  for(i=(0);i<(N);i++){
    a[i] = arr[i].first;
    b[i] = arr[i].second.first;
    c[i] = arr[i].second.second;
  }
}
template<class T1> void rsortA_L(int N, T1 a[], void *mem = wmem){
  sortA_L(N, a, mem);
  reverse(a, a+N);
}
template<class T1, class T2> void rsortA_L(int N, T1 a[], T2 b[], void *mem = wmem){
  sortA_L(N, a, b, mem);
  reverse(a, a+N);
  reverse(b, b+N);
}
inline int my_getchar_unlocked(){
  static char buf[1048576];
  static int s = 1048576;
  static int e = 1048576;
  if(s == e && e == 1048576){
    e = fread_unlocked(buf, 1, 1048576, stdin);
    s = 0;
  }
  if(s == e){
    return EOF;
  }
  return buf[s++];
}
inline void rd(int &x){
  int k;
  int m=0;
  x=0;
  for(;;){
    k = my_getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = my_getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
inline void rd(char &c){
  int i;
  for(;;){
    i = my_getchar_unlocked();
    if(i!=' '&&i!='\n'&&i!='\r'&&i!='\t'&&i!=EOF){
      break;
    }
  }
  c = i;
}
inline int rd(char c[]){
  int i;
  int sz = 0;
  for(;;){
    i = my_getchar_unlocked();
    if(i!=' '&&i!='\n'&&i!='\r'&&i!='\t'&&i!=EOF){
      break;
    }
  }
  c[sz++] = i;
  for(;;){
    i = my_getchar_unlocked();
    if(i==' '||i=='\n'||i=='\r'||i=='\t'||i==EOF){
      break;
    }
    c[sz++] = i;
  }
  c[sz]='\0';
  return sz;
}
struct MY_WRITER{
  char buf[1048576];
  int s;
  int e;
  MY_WRITER(){
    s = 0;
    e = 1048576;
  }
  ~MY_WRITER(){
    if(s){
      fwrite_unlocked(buf, 1, s, stdout);
    }
  }
}
;
MY_WRITER MY_WRITER_VAR;
void my_putchar_unlocked(int a){
  if(MY_WRITER_VAR.s == MY_WRITER_VAR.e){
    fwrite_unlocked(MY_WRITER_VAR.buf, 1, MY_WRITER_VAR.s, stdout);
    MY_WRITER_VAR.s = 0;
  }
  MY_WRITER_VAR.buf[MY_WRITER_VAR.s++] = a;
}
inline void wt_L(char a){
  my_putchar_unlocked(a);
}
inline void wt_L(const char c[]){
  int i=0;
  for(i=0;c[i]!='\0';i++){
    my_putchar_unlocked(c[i]);
  }
}
template<class S> inline void arrInsert(const int k, int &sz, S a[], const S aval){
  int i;
  sz++;
  for(i=sz-1;i>k;i--){
    a[i] = a[i-1];
  }
  a[k] = aval;
}
template<class S, class T> inline void arrInsert(const int k, int &sz, S a[], const S aval, T b[], const T bval){
  int i;
  sz++;
  for(i=sz-1;i>k;i--){
    a[i] = a[i-1];
  }
  for(i=sz-1;i>k;i--){
    b[i] = b[i-1];
  }
  a[k] = aval;
  b[k] = bval;
}
template<class S, class T, class U> inline void arrInsert(const int k, int &sz, S a[], const S aval, T b[], const T bval, U c[], const U cval){
  int i;
  sz++;
  for(i=sz-1;i>k;i--){
    a[i] = a[i-1];
  }
  for(i=sz-1;i>k;i--){
    b[i] = b[i-1];
  }
  for(i=sz-1;i>k;i--){
    c[i] = c[i-1];
  }
  a[k] = aval;
  b[k] = bval;
  c[k] = cval;
}
template<class S, class T, class U, class V> inline void arrInsert(const int k, int &sz, S a[], const S aval, T b[], const T bval, U c[], const U cval, V d[], const V dval){
  int i;
  sz++;
  for(i=sz-1;i>k;i--){
    a[i] = a[i-1];
  }
  for(i=sz-1;i>k;i--){
    b[i] = b[i-1];
  }
  for(i=sz-1;i>k;i--){
    c[i] = c[i-1];
  }
  for(i=sz-1;i>k;i--){
    d[i] = d[i-1];
  }
  a[k] = aval;
  b[k] = bval;
  c[k] = cval;
  d[k] = dval;
}
template<class S, class T> inline S chmin(S &a, T b){
  if(a>b){
    a=b;
  }
  return a;
}
int N;
int tot[1000000];
int mn[1000000];
char S[1000000+2];
int sz;
int tt[1000000];
int mm[1000000];
int vv[1000000];
int main(){
  wmem = memarr;
  int i;
  int j;
  int k;
  int len;
  int t;
  int m;
  rd(N);
  for(j=(0);j<(N);j++){
    len = rd(S);
    k = m = 0;
    for(i=(0);i<(len);i++){
      if(S[i]=='('){
        k++;
      }
      if(S[i]==')'){
        k--;
      }
      chmin(m, k);
    }
    tot[j] = k;
    mn[j] = m;
  }
  {
    int cTE1_r3A;
    int RZTsC2BF;
    if(N==0){
      RZTsC2BF = 0;
    }
    else{
      RZTsC2BF = tot[0];
      for(cTE1_r3A=(1);cTE1_r3A<(N);cTE1_r3A++){
        RZTsC2BF += tot[cTE1_r3A];
      }
    }
    k =RZTsC2BF;
  }
  if(k != 0){
    wt_L("No");
    wt_L('\n');
    return 0;
  }
  for(i=(0);i<(N);i++){
    if(tot[i] >= 0){
      arrInsert(sz, sz, tt, tot[i], mm, mn[i]);
    }
  }
  rsortA_L(sz, mm, tt);
  for(i=(0);i<(sz);i++){
    if(k + mm[i] < 0){
      wt_L("No");
      wt_L('\n');
      return 0;
    }
    k += tt[i];
  }
  sz = 0;
  for(i=(0);i<(N);i++){
    if(tot[i] < 0){
      arrInsert(sz, sz, tt, tot[i], mm, mn[i]);
    }
  }
  for(i=(0);i<(sz);i++){
    vv[i] = mm[i] - tt[i];
  }
  sortA_L(sz, vv, mm, tt);
  for(i=(0);i<(sz);i++){
    if(k + mm[i] < 0){
      wt_L("No");
      wt_L('\n');
      return 0;
    }
    k += tt[i];
  }
  wt_L("Yes");
  wt_L('\n');
  return 0;
}
// cLay varsion 20200509-1

// --- original code ---
// int N;
// int tot[1d6], mn[1d6];
// char S[1d6+2];
// 
// int sz, tt[1d6], mm[1d6], vv[1d6];
// 
// {
//   int i, j, k, len;
//   int t, m;
//   rd(N);
//   rep(j,N){
//     rd(S@len);
//     k = m = 0;
//     rep(i,len){
//       if(S[i]=='(') k++;
//       if(S[i]==')') k--;
//       m <?= k;
//     }
//     tot[j] = k;
//     mn[j] = m;
//   }
// 
//   k = sum(tot(N));
//   if(k != 0) wt("No"), return 0;
// 
//   rep(i,N) if(tot[i] >= 0) arrInsert(sz, sz, tt, tot[i], mm, mn[i]);
//   rsortA(sz, mm, tt);
// //  rep(i,sz) wt(i,":",tt[i],mm[i]);
//   rep(i,sz){
//     if(k + mm[i] < 0) wt("No"), return 0;
//     k += tt[i];
//   }
// 
//   sz = 0;
//   rep(i,N) if(tot[i] < 0) arrInsert(sz, sz, tt, tot[i], mm, mn[i]);
//   rep(i,sz) vv[i] = mm[i] - tt[i];
//   sortA(sz, vv, mm, tt);
// //  rep(i,sz) wt(i,":",tt[i],mm[i]);
//   rep(i,sz){
//     if(k + mm[i] < 0) wt("No"), return 0;
//     k += tt[i];
//   }
// 
//   wt("Yes");
// }


Measured memory_bytes: 24104