#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <iterator>
#include <cassert>
#include <numeric>
#include <functional>
//#include <numeric>
#pragma warning(disable:4996) 
 
typedef long long ll;
typedef unsigned long long ull;
#define MIN(a, b) ((a)>(b)? (b): (a))
#define MAX(a, b) ((a)<(b)? (b): (a))
#define LINF  9223300000000000000
#define LINF2 1223300000000000000
#define INF 2140000000
//const long long MOD = 1000000007;
const long long MOD = 998244353;

using namespace std;


bool solve0( int n, const vector<int>& a, const vector<int>& b )
{
    vector<pair<int, int> > z[2];
    ll sa = 0;
    int i;
    for (i = 0; i < n; i++) {
        sa += a[i];
        if (a[i] >= 0) z[0].push_back(make_pair(b[i], a[i]));
        else           z[1].push_back(make_pair(b[i] - a[i], -a[i]));
    }
    if (sa != 0) {
        return false;
    }
    sort(z[0].rbegin(), z[0].rend());
    sort(z[1].rbegin(), z[1].rend());

    int k;
    for (k = 0; k < 2; k++) {
        int saa = 0;
        for (i = 0; i <(int)z[k].size(); i++) {
            int bb = z[k][i].first;
            int aa = z[k][i].second;
            if (aa < 0) {
                break;
            }
            if (saa + bb < 0) {
                return false;
            }
            saa += aa;
        }
    }
    return true;
}
 
bool solve1( int n, const vector<int>& a, const vector<int>& b )
{
    vector<pair<int, int> > z(n);
    ll sa = 0;
    int i;
    for (i = 0; i < n; i++) {
        sa += a[i];
        z[i] = make_pair(b[i], a[i]);
    }
    sort(z.rbegin(), z.rend());
    if (sa != 0) {
        return false;
    }
 
    set<pair<pair<int, int>, int> > ss;   // a,b,id
    int saa = 0;
    int curr = 0;
    int flag = 0;
 
    int cntall = 0;
    while (1) {
        if (flag == 0) {
            while (curr < n) {
                int bb = z[curr].first;
                int aa = z[curr].second;
                if (bb + saa >= 0) {
                    ss.insert(make_pair(make_pair(aa, bb), curr));
                    curr++;
                }
                else {
                    break;
                }
            }
        }
        else {
            if (curr == n) curr--;
            while (curr >= 0) {
                int bb = z[curr].first;
                int aa = z[curr].second;
                if (bb + saa < 0) {
                    ss.erase(make_pair(make_pair(aa, bb), curr));
                    curr--;
                }
                else {
                    break;
                }
            }
        }
 
        if (ss.empty()) {
            break;
        }
        else {
            int cnt0 = 0;
            while(!ss.empty()) {
                auto it = ss.rbegin();
                int aa = it->first.first;
                if (aa >= 0) {
                    saa += aa;
                    ss.erase(*it);
                    cnt0++;
                    cntall++;
                }
                else {
                    break;
                }
            }
            if (cnt0 == 0) {
                auto it = ss.rbegin();
                int aa = it->first.first;
                if (aa < 0) {
                    flag = 1;
                }
                saa += aa;
                cntall++;
                ss.erase(*it);
            }
        }
    }
    if (cntall < n) {
        return false;
    }
    else {
        return true;
    }
}

char str[1000005];
 
void solve()
{
    int n;
    scanf("%d", &n);
    vector<int> a(n), b(n);
    int i,j;
    for (i = 0; i < n; i++) {
        scanf("%s", str);
        int len = strlen(str);
        int cnt = 0;
        int min = 0;
        for (j = 0; j < len; j++) {
            if (str[j] == '(') {
                cnt++;
            }
            else {
                cnt--;
            }
            min = MIN(min, cnt);
        }
        a[i] = cnt;
        b[i] = min;
    }
    bool ok = solve0(n, a, b);
    if (ok) {
        printf("Yes\n");
    }
    else {
        printf("No\n");
    }
 
    return;
}

int main(int argc, char* argv[])
{
#if 1
    solve();
#else
    int T;
    scanf("%d", &T);
    int t;
    for(t=0; t<T; t++) {
        //printf("Case #%d: ", t+1);
        solve();
    }
#endif
    return 0;
}


Measured memory_bytes: 18552