#include <bits/stdc++.h>
#ifdef __DEBUG__
    #define DBG(X) cout << #X << " = " << (X) << endl;
    #define SAY(X) cout << (X) << endl;
#else
    #define DBG(X)
    #define SAY(X)
#endif

using namespace std;

using ll = long long int;
using ull = unsigned long long int;
using ld = long double;
using pll = pair<ll, ll>;

int dx[]={1, 0, -1, 0, 1,-1, 1,-1};
int dy[]={0, 1, 0, -1, 1, 1,-1,-1};
const int INT_INF = (int)(2e9);
const ll  LL_INF = (ll)(2e18);

inline void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); };
template<typename T, typename S> inline ostream& operator<<(ostream& os, const pair<T, S> p) { cout << "[" << p.first << ";" << p.second << "]"; return os; }
template<typename T, typename S> inline ostream& operator<<(ostream& os, const map<T, S> p) { for (auto el : p) cout << "[" << el.first << ";" << el.second << "]"; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const vector<T>& v) { for (auto el : v) cout << el << " "; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const deque<T>& v) { for (auto el : v) cout << el << " "; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const set<T>& v) { for (auto el : v) cout << el << " "; return os; }
template<typename T> inline vector<T> fetch_vec(int sz) { vector<T> ret(sz); for (auto& elem : ret) cin >> elem; return ret; }

int N;
vector<string> S;
void input(){
    fast_io();
    cin >> N;
    for (int i = 0; i < N; i++)
    {
        string s; cin >> s;
        S.push_back(s);
    }
}

pll shrink(string s){
    pll ret = make_pair(0,0);
    for (int i = 0; i < (int)s.length(); i++)
    {
        if(s[i]=='(') ret.second++;
        else{
            if(ret.second) ret.second--;
            else ret.first++;
        }
    }
    // while(!st.empty()){ret += st.top();st.pop();}
    return ret;
}

ll depth_s(string s){
   ll ret = 0;
   for (int i = 0; i < (int)s.length(); i++)
   {
       if(s[i]=='(') ret++;
       else ret--;
   }
   return ret;    
}

pll sum_pll(pll a, pll b){
    if(a.first==0 && a.second==0) return b;
    // 消える数が多い方にする。
    // 左に接続した場合。
    pll ret;
    int le_erase = min(a.first,b.second);
    // 右に接続
    int ri_erase = min(a.second,b.first);
    if(le_erase>ri_erase){
        // 左に接続する場合。
        if(a.first>b.second){
            ret.first = a.first+b.first-b.second;
            ret.second = a.second;
        }
        else{
            ret.first = b.first;
            ret.second = a.second+b.second-a.first;
        }
    }
    else{
        // 右に接続する場合。
        if(a.second>b.first){
            ret.first = a.first;
            ret.second = a.second-b.first+b.second;
        }
        else{
            ret.first = a.first+b.first-a.second;
            ret.second = b.second;
        }
    }
    return ret;
}

bool solve(){
    vector<pll> ls,rs;

    for(auto s:S) {
        pll tmp = shrink(s);
        if(tmp.first>tmp.second) rs.push_back(tmp);
        else ls.push_back(tmp);
    }

    sort(ls.begin(),ls.end(),[](pll a,pll b){return a.first < b.first;});
    sort(rs.begin(),rs.end(),[](pll a,pll b){return a.second > b.second;});
    ll cur = 0;
    for(pll l:ls){
        cur -= l.first;
        if(cur<0) return false;
        cur += l.second;
    }
    for(pll r:rs){
        cur -= r.first;
        if(cur<0) return false;
        cur += r.second;
    }
    if(cur!=0) return false;
    return true;
}   

int main()
{
    input();
    string ans = solve()?"Yes":"No";    
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 61296