#pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <bitset>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#define IINF 100000000
#define INF 300000000000000000
#define MOD 998244353
#define mod 998244353
#define INT_MAX_ 2147483647
#define REP(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define REPE(i, a, n) for (ll i = a; i <= (ll)(n); i++)
#define rep(i,n)for (ll i = 0; i < (ll)(n); i++)
#define Endl endl
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
#define me memset
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<int,int>Pin;
typedef pair<ll,ll>Pll;
template<class T> using V=vector<T>;
template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
long long GCD(long long a, long long b) {return b?GCD(b,a%b):a;}
long long LCM(long long a, long long b) {return a/GCD(a,b)*b;}
int dx[4]={-1,0,1,0};
int dy[4]={0,-1,0,1};
int ddx[8]={-1,0,1,0,1,1,-1,-1};
int ddy[8]={0,-1,0,1,1,-1,1,-1};
ll cmp1(pair<ll,ll>a,pair<ll,ll> b){
        if(a.fi!=b.fi)
        return a.fi<b.fi;
        else
        return a.se>b.se;
}
//----------------------------------------------------------------------
ll cnt[1000010][2];
//----------------------------------------------------------------------
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    //-------------------------------  
    //ll begin_time=clock();
    //-------------------------------
    ll n;cin>>n;
    V<string>s;
    for(ll i=0;i<n;i++){
        string t;cin>>t;
        s.pb(t);
    }

    int xl=0,xr=0,xxl=0,xxr=0;
    for(ll i=0;i<n;i++){
        ll l=0,r=0;
        for(ll j=0;j<s[i].length();j++){
            if(s[i][j]=='('){
                l++;
            }
            else{
                if(l)l--;
                else r++;
            }
        }
        cnt[i][0]=r;
        cnt[i][1]=l;
    }
    V<Pll>lr;
    ll tl=0,tr=0;
    for(ll i=0;i<n;i++){
        //cout<<" "<<cnt[i][1]<<" "<<cnt[i][0]<<endl;cnt[i][1]
        lr.pb(mp(cnt[i][0],cnt[i][1]));
        tl+=cnt[i][1];
        tr+=cnt[i][0];
    }
    sort(all(lr),cmp1);
    //reverse(all(lr));
    bool color[1000010];
    memset(color,0,sizeof(color));
    ll first_l=0,last_r=0;
    for(ll i=0;i<n;i++){
        if(lr[i].fi==0){
            first_l+=lr[i].se;
            color[i]=1;
        }
        if(lr[i].se==0){
            last_r+=lr[i].fi;
            color[i]=1;
        }
    }
    bool kkt=1;
    ll nl=0,nr=0;
    nl+=first_l;
    for(ll i=0;i<n;i++){
        if(color[i]==1)continue;
        if(nl-lr[i].fi>=0&&lr[i].se>lr[i].fi){
            nl+=lr[i].se-lr[i].fi;
            color[i]=1;
        }
    }
    for(ll i=n-1;i>=0;i--){
        if(color[i]==1)continue;
        nl-=lr[i].fi;
        if(nl<0){
            kkt=0;
            break;
        }
        nl+=lr[i].se;
    }
    nl-=last_r;
    if(kkt&&nl==0){
        cout<<"Yes"<<endl;
    }
    else cout<<"No"<<endl;
    //-------------------------------  
    //ll end_time=clock();cout<<"time="<<end_time-begin_time<<"ms"<<endl;
    //-------------------------------
    return 0;
}
//----------------------------------------------------------------------





































Measured memory_bytes: 82940