/**
 *    author:   K.R.Surrya  
 *    created:  14/05/2020 00:35:17
**/
#include<bits/stdc++.h>
#define vi vector<int>
#define vii vector<vector<int> >
#define vpi vector<pair<int,int> >
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define pb push_back
using namespace std; 

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it)  { return ;}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a,Args... args)
{
    cerr << *it << " = " << a <<endl;
    err(++it,args...);   //args is going to end.
}

void solve() { 
    int n;
    cin >> n;
    vector<string> input;
    vector<tuple<int,int,int>> open;
    vector<tuple<int,int,int>> close;

    vector<int> idx(n,0);
    iota(begin(idx),end(idx),0);
    while(n --> 0) {
        string s;
        cin >> s;
        input.push_back(s);
        int idx=(int)input.size()-1;
        int now=0;
        int a=0;
        int b=0;   //b is the number of openings and it nees to be maximized;;
        for(int i=0;i<s.size();++i) {
            char curr=s[i];
            if(s[i]=='(') { 
                ++now;
                ++b;
            } else { 
                --now;
                ++a;
            }
        }
        if(now<0) {
          close.emplace_back(make_tuple(a,b,idx));
        } else { 
          open.emplace_back(make_tuple(a,b,idx));
        }
    }
    sort(open.begin(),open.end(),[&](tuple<int,int,int> x,tuple<int,int,int> y) {
        int one=get<0>(x);
        int two=get<0>(y);
        return one<two;
    });

    sort(close.begin(),close.end(),[&](tuple<int,int,int> x,tuple<int,int,int> y){
        int one=get<1>(x);
        int two=get<1>(y);
        return one>two;
    });

    int now=0;
    bool ok=1;
    for(int i=0;i<open.size();++i) {
        int idx=get<2>(open[i]);
         for(int j=0;j<input[idx].size();++j) {
             char curr=input[idx][j];
             if(curr=='(') { 
                 ++now;
             } else{ 
                 --now;
             }
             if(now<0) {
                 ok=0;
                 break;
             }
         }
         if(!ok) break;
    }

    for(int i=0;i<close.size();++i) {
        int idx=get<2>(close[i]);
        for(int j=0;j<input[idx].size();++j) { 
            char curr=input[idx][j];
            if(curr=='(') {
                ++now;
            } else { 
                --now;
            }
            if(now<0) {
                ok=0;
                break;
            }
        }
        if(!ok) { 
            break;
        }
    }

   if(now==0&&ok) {
       cout << "Yes" << '\n';
   } else { 
       cout << "No" << '\n';
   }
}
int main()
{   
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);

     auto start = chrono::high_resolution_clock::now();
     solve();
     auto end = chrono::high_resolution_clock::now();

     cerr << " Execution time : " << chrono::duration_cast<chrono::milliseconds>(end-start).count()<<"ms"<<endl;

   
    return 0;
}


Measured memory_bytes: 58648