#include <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#include <unistd.h>
#include <cassert>
#include <cctype>
#include <random>
#include <time.h>
#include <functional>
#define _USE_MATH_DEFINES
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<ll, ll, ll, ll> tlglglglg;
typedef tuple<double, double, double> tddd;
typedef complex<double> xy_t;
typedef vector<ll> vll;
typedef vector< vector<ll> > matrix;
typedef unsigned int uint;
typedef unsigned long long ull;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using VVV = V<VV<T>>;
#define REP(i, x, y) for(ll i = (ll)x; i < (ll)y; i++)
#define DREP(i, x, y, d) for(ll i = (ll)x; i < (ll)y; i += (ll)d)
#define PER(i, x, y) for(ll i = (ll)x; i > (ll)y; i--)
#define DPER(i, x, y, d) for(ll i = (ll)x; i > (ll)y; i -= (ll)d)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
int iinf = intmax / 8;
ll inf = llmax / 8;
double eps = 1e-12;
void yesno(bool ok, string yes = "Yes", string no = "No") {
    if (ok) {
        cout << yes << endl;
    } else {
        cout << no << endl;
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll N;
    cin >> N;
    string S[N];
    V<plglg> plus, zero, minus;
    ll plnum = 0, minum = 0;
    REP(i, 0, N) {
        cin >> S[i];
        ll len = S[i].size();
        ll num = 0;
        ll mx = 0;
        ll mi = 0;
        REP(j, 0, len) {
            if (S[i][j] == '(') {
                num++;
            } else {
                num--;
            }
            mx = max(mx, num);
            mi = min(mi, num);
        }
        if (num > 0) {
            plus.push_back(plglg(mi, num));
            plnum += num;
        } else if (num == 0) {
            zero.push_back(plglg(mi, mx));
        } else {
            minus.push_back(plglg(mi - num, -num));
            minum += -num;
        }
    }
    sort(plus.begin(), plus.end());
    reverse(plus.begin(), plus.end());
    ll plen = plus.size();
    ll now = 0;
    bool ok = true;
    if (plnum != minum) {
        ok = false;
    }
    REP(i, 0, plen) {
        plglg p = plus[i];
        if (now + p.first < 0) {
            ok = false;
        }
        now += p.second;
    }
    ll zlen = zero.size();
    REP(i, 0, zlen) {
        plglg p = zero[i];
        if (now + p.first < 0) {
            ok = false;
        }
    }
    sort(minus.begin(), minus.end());
    reverse(minus.begin(), minus.end());
    ll mlen = minus.size();
    now = 0;
    REP(i, 0, mlen) {
        plglg p = minus[i];
        if (now + p.first < 0) {
            ok = false;
        }
        now += p.second;
    }
    yesno(ok);
}


Measured memory_bytes: 50308