#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#ifdef ENABLE_DEBUG
#define dump(a) cerr<<#a<<"="<<a<<endl
#define dumparr(a,n) cerr<<#a<<"["<<n<<"]="<<a[n]<<endl
#else
#define dump(a) 
#define dumparr(a,n) 
#endif
#define FOR(i, a, b) for(ll i = (ll)a;i < (ll)b;i++)
#define For(i, a) FOR(i, 0, a)
#define REV(i, a, b) for(ll i = (ll)b-1LL;i >= (ll)a;i--)
#define Rev(i, a) REV(i, 0, a)
#define REP(a) For(i, a)
#define SIGN(a) (a==0?0:(a>0?1:-1))

typedef long long int ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef pair<ll, ll> pll;
typedef pair<ll,pll> ppll;
typedef vector<ll> vll;
typedef long double ld;
typedef pair<ld,ld> pdd;

const ll INF=(1LL<<50);
#if __cplusplus<201700L
ll gcd(ll a, ll b) {
  if(a < b) return gcd(b, a);
  ll r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
#endif
template<class T>
bool chmax(T& a,const T& b){
  if(a<b){
    a=b;
    return true;
  }
  return false;
}
template<class T>
bool chmin(T& a,const T& b){
  if(a>b){
    a=b;
    return true;
  }
  return false;
}
template<class S,class T>
std::ostream& operator<<(std::ostream& os,pair<S,T> a){
  os << "(" << a.first << "," << a.second << ")";
  return os;
}
template<class T>
std::ostream& operator<<(std::ostream& os,vector<T> a){
  os << "[ ";
  REP(a.size()){
    os<< a[i] << " ";
  }
  os<< " ]";
  return os;
}

const string YES = "Yes";
const string NO = "No";

void solve(long long N, std::vector<std::string> S){
  vector<pll> lr(N);
  REP(N){
    ll cur=0;
    ll prev=0;
    for (auto &&j : S[i])
    {
      if(j==')'){
        if(cur==0){
          ++prev;
        }else{
          --cur;
        }
      }else{
        ++cur;
      }
    }
    lr[i]=pll(prev,cur);
  }
  vector<vector<pll>> x(1000000),y(1000000);
  REP(N){
    x[lr[i].first].push_back(pll(lr[i].second-lr[i].first,i));
    y[lr[i].second].push_back(pll(lr[i].first-lr[i].second,i));
  }
  set<ll> f,l;
  ll cnt=0;
  REP(N){
    if(lr[i].first==0)f.insert(i);
    if(lr[i].second==0)l.insert(i);
    cnt+=lr[i].second-lr[i].first;
  }
  bool flag=true;
  if(f.size()==1&&l.size()==1&&*f.begin()==*l.begin()){
    flag=false;
  }
  
  priority_queue<pll> q;
  ll sum=0,num=0,prev=0;
  for (auto &&i : x[0])
  {
    q.push(i);
    ++num;
  }
  while(!f.empty()&&!l.empty()&&cnt==0&&flag&&!q.empty()){
    auto cur=q.top();q.pop();
    if(cur.first<0){
      q.push(cur);
      break;
    }
    sum+=cur.first;
    for (ll i = prev+1; i <= sum&&i<1000000; i++)
    {
      for (auto &&j : x[i])
      {
        q.push(j);
        ++num;
      }
    }
    prev=max(prev,sum);
  }
  priority_queue<pll> q2;
  ll num2=0;
  sum=0;
  prev=0;
  for (auto &&i : y[0])
  {
    q.push(i);
    ++num2;
  }
  while(!f.empty()&&!l.empty()&&cnt==0&&flag&&!q.empty()){
    auto cur=q.top();q.pop();
    if(cur.first<0){
      q.push(cur);
      break;
    }
    sum+=cur.first;
    for (ll i = prev+1; i <= sum&&i<1000000; i++)
    {
      for (auto &&j : y[i])
      {
        q.push(j);
        ++num2;
      }
    }
    prev=max(prev,sum);
  }
  if(!f.empty()&&!l.empty()&&flag&&cnt==0&&num==N&&num2==N){
    cout<<YES<<endl;
  }else{
    dump(num);
    cout<<NO<<endl;
  }
}

int main(){
  cout<<setprecision(1000);
    long long N;
    scanf("%lld",&N);
    std::vector<std::string> S(N);
    for(int i = 0 ; i < N ; i++){
        std::cin >> S[i];
    }
    solve(N, std::move(S));
    return 0;
}


Measured memory_bytes: 208252