#pragma GCC optimize("O3")
//#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld  double
#define pii pair<int,int>
#define pip pair<int,pii>
#define ppi pair<pii,int> 
#define ppp pair<pii,pii>
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define ff first
#define ss second
#define warmup ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int N = 200003, mod=1e9+7;
const ll inf=(1e9+11);

signed main()
{
    warmup
    
    int n;
    cin>>n;
    string s[n+1];
    int i,j,a,sz,b,f;
    for(i=1;i<=n;++i)
        cin>>s[i];
    stack<char> st;
    vector<pii> v[2];
    int c1=0, c2=0;
    for(i=1;i<=n;++i)
    {
        sz=s[i].size();
        for(j=0;j<sz;++j)
            if(s[i][j]=='(' or st.empty())
                st.push(s[i][j]);
            else 
                st.pop();
        a=0, b=0;
        if(st.empty())
            continue;
        f=(st.top()=='(');
        while(!st.empty())
        {
            if(st.top()=='(')
                ++a;
            else
                ++b;
            st.pop();
        }
        
        if(!a)
            c2+=b;
        else if(!b)
            c1+=a;
        else if(a-b>=0)
            v[0].pb({a,b});
        else
            v[1].pb({a,b});
    }      
    
    sort(v[0].begin(), v[0].end(), [&](pii a,pii b){
        return a.ss<b.ss;
    });
    for(auto it:v[0])
    {
        c1-=it.ss;
        if(c1<0)
            return cout<<"No", 0;
        c1+=it.ff;
    }   
    for(auto it:v[1])
        c1+=it.ff-it.ss;
    c1-=c2;
    cout<<(c1!=0 ? "No":"Yes");
    
    return 0;
}
