#include <bits/stdc++.h>

#define in freopen("input.txt", "r", stdin);
#define out freopen("output.txt", "w", stdout);
#define clr(arr, key) memset(arr, key, sizeof arr)
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define infinity (1 << 28)
#define LL long long
#define PI acos(-1)
#define gcd(a, b) __gcd(a, b)
#define CF ios_base::sync_with_stdio(0);cin.tie(0);
#define lcm(a, b) ((a)*((b)/gcd(a,b)))
#define all(v) v.begin(), v.end()
#define no_of_ones __builtin_popcount // __builtin_popcountll for LL
#define SZ(v) (int)(v.size())
#define eps 1e-7

//int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
//int col[4] = {1, 0, -1, 0};
//int row[4] = {0, 1, 0, -1};
//int months[13] = {0, ,31,28,31,30,31,30,31,31,30,31,30,31};

using namespace std;

struct point{int x, y; point () {} point(int a, int b) {x = a, y = b;}};
template <class T> T sqr(T a){return a * a;}
template <class T> T power(T n, T p) { T res = 1; for(int i = 0; i < p; i++) res *= n; return res;}
template <class T> double getdist(T a, T b){return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));}    // distance between a and b
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}
template <class T> string tostring(T n) {stringstream ss; ss << n; return ss.str();}
//LL bigmod(LL B,LL P,LL M){LL R=1; while(P>0)  {if(P%2==1){R=(R*B)%M;}P/=2;B=(B*B)%M;} return R;}
struct fast{fast(){ios_base::sync_with_stdio(0);cin.tie(0);}}cincout;

#define MAX 1000010
/***********************************THE GRASS IS ALWAYS GREENER ON THE OTHER SIDE***********************************/

struct B{
    string s;
    int open, closed;
}arr[MAX];

bool simplify(string &s){
    stack <char> st;
    for(auto x: s){
        if(st.empty() || x == '(')
        {
            st.push(x);
            continue;
        }
        if(x == ')'){
            if(!st.empty() && st.top() == '('){
                st.pop();
            }
            else
                st.push(x);
        }
    }
    s.clear();
    while(!st.empty()){
        s += st.top();
        st.pop();
    }
    reverse(all(s));
    return s.empty();
}

bool comp(const B &a, const B &b){
    return a.open - a.closed > b.open-b.closed;
}

int main()
{
    // in;
    int n;
    cin >> n;
    vector <B> onlyOpen, onlyClosed, both;
    for(int i = 0; i < n; i++){
        cin >> arr[i].s;
        if(simplify(arr[i].s))
            continue;
        for(auto x: arr[i].s)
        {
            if(x == '(')
                arr[i].open++;
            else arr[i].closed++;
        }
        if(arr[i].open == 0){
            if(arr[i].closed)
                onlyClosed.pb(arr[i]);
        }
        else if(arr[i].closed == 0){
            if(arr[i].open)
                onlyOpen.pb(arr[i]);
        }else both.pb(arr[i]);
    }
    sort(all(both), comp);
    string s;
    for(int i = 0; i < SZ(onlyOpen); i++)
        s += onlyOpen[i].s;
    for(int i = 0; i < SZ(both); i++)
        s += both[i].s;
    for(int i = 0; i < SZ(onlyClosed); i++)
        s += onlyClosed[i].s;
    if(simplify(s))
        cout << "Yes";
    else cout << "No";
    return 0;
}


Measured memory_bytes: 84212