#include <bits/stdc++.h>

using namespace std;

typedef pair<int, int> pii;

int n;
string s;
vector<pii> neg, pos;

void fail(){
    cout << "No\n";
    exit(0);
}

int main(){
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

    cin >> n;

    for(int i = 1; i <= n; i++){
        cin >> ws >> s;

        int sum = 0, mn = 0;

        for(auto &k : s){
            if(k == '(') sum++;
            else sum--;

            mn = min(sum, mn);
        }

        if(sum >= 0) pos.emplace_back(-mn, sum);
        else neg.emplace_back(mn, sum);
    }

    sort(pos.begin(), pos.end());

    int st = 0;
    for(auto &k : pos){
        if(st - k.first < 0) fail();

        st += k.second;
    }

    sort(neg.begin(), neg.end(), [&] (pii a, pii b){
        return a.second - a.first > b.second - b.first;
    });

    for(auto &k : neg){
        if(st + k.first < 0) fail();

        st += k.second;
    }

    if(st != 0) fail();

    cout << "Yes\n";
    
    return 0;
}