#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define range(a) a.begin(), a.end()

pair<int, int> f(string s) {
    int x = 0;
    int res = 0;
    for (char c : s) {
        if (c == '(') x++;
        if (c == ')') x--;
        res = min(res, x);
    }
    return make_pair(res, x);
}

int main() {
    int N; cin >> N;
    vector<string> S(N); rep(i, N) cin >> S[i];
    vector<int> F(N), G(N);
    rep(i, N) {
        auto tmp = f(S[i]);
        F[i] = tmp.first;
        G[i] = tmp.second;
    }
    vector<int> ord(N); rep(i, N) ord[i] = i;
    sort(range(ord), [&](int i, int j) {
        int ij = min(F[i], G[i] + F[j]);
        int ji = min(F[j], G[j] + F[i]);
        if (ij != ji) return ij > ji;
        return G[i] > G[j];
    });
    string ans;
    for (int i : ord) ans += S[i];
    auto tmp = f(ans);    
    cout << (tmp.first == 0 and tmp.second == 0 ? "Yes" : "No") << endl;
}