#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/rope"

using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;

template <typename T> using order_set = tree <T, null_type, less <T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T1, typename T2> using order_map = tree <T1, T2, less <T1>, rb_tree_tag, tree_order_statistics_node_update>;

template <class T> bool MIN(T &a, T b) { return a > b ? (a = b, true) : false; }
template <class T> bool MAX(T &a, T b) { return a < b ? (a = b, true) : false; }

#define ll              long long int
#define endl            '\n'
#define pii             pair <int, int>
#define pll             pair <ll, ll>
#define mk              make_pair
#define ff              first
#define ss              second
#define all(a)          (a).begin(), (a).end()
#define rall(a)         (a).rbegin(), (a).rend()
#define eb              emplace_back
#define pb              push_back
#define LINE            __LINE__

static const int maxn = 1000 + 5;
static const int logn = 19;

struct Node {
      string s;
      int open, close;
      Node(string s = "", int open = 0, int close = 0)
            : s(s), open(open), close(close) {}
};

signed main()
{
      ios_base::sync_with_stdio(false);
      cin.tie(nullptr);

      auto seed = chrono::high_resolution_clock::now().time_since_epoch().count();
      mt19937 mt_rand(seed);

      function <ll(ll, ll)> Rand = [&](ll l, ll r) {
            ll rnd = uniform_int_distribution <ll> (l, r)(mt_rand);
            return rnd;
      };

      int n;
      cin >> n;
      int total = 0;
      vector <string> vec;
      for (int i = 1; i <= n; i++) {
            string s;
            cin >> s;
            int len = s.size();
            stack < pair <char, int> > st;
            vector <int> cor(len, -1);
            for (int i = 0; i < len; i++) {
                  char ch = s[i];
                  if (ch == '(') {
                        st.emplace(ch, i);
                  }
                  else {
                        if (st.size()) {
                              cor[ st.top().second ] = i;
                              cor[i] = st.top().second;
                              st.pop();
                        }
                  }
            }
            string str;
            for (int i = 0; i < len; i++) {
                  if (cor[i] == -1) {
                        str.push_back(s[i]);
                  }
            }
            if (str.size()) {
                  vec.push_back(str);
            }
      }
      string start = "";
      string middle = "";
      string last = "";
      vector <Node> START;
      vector <Node> MIDDLE;
      vector <Node> LAST;
      for (string s : vec) {
//            cerr << s << endl;
            int open = 0;
            int close = 0;
            for (char ch : s) {
                  if (ch == '(') {
                        open++;
                  }
                  else {
                        close++;
                  }
            }
            if (s[0] == '(') {
                  START.emplace_back(Node(s, open, close));
            }
            else if (s.back() == ')') {
                  LAST.emplace_back(Node(s, open, close));
            }
            else {
                  MIDDLE.emplace_back(Node(s, open, close));
            }
      }
      sort(START.begin(), START.end(), [&](Node &a, Node &b)
           {
                  return a.open > b.open;
           });
      sort(MIDDLE.begin(), MIDDLE.end(), [&](Node &a, Node &b)
           {
                  return a.open - a.close > b.open - b.close;
           });
      sort(LAST.begin(), LAST.end(), [&](Node &a, Node &b)
           {
                  return a.close < b.close;
           });
      string bracket = "";
      for (Node it : START) {
            bracket += it.s;
      }
      for (Node it : MIDDLE) {
            bracket += it.s;
      }
      for (Node it : LAST) {
            bracket += it.s;
      }
//      cerr << "bracket=" << bracket << endl;
      stack <char> st;
      for (char ch : bracket) {
            if (ch == '(') {
                  st.emplace(ch);
            }
            else {
                  if (st.empty()) {
                        cout << "No" << endl;
                        return 0;
                  }
                  st.pop();
            }
      }
      if (st.size()) {
            cout << "No" << endl;
      }
      else {
            cout << "Yes" << endl;
      }

      #ifndef ONLINE_JUDGE
            cerr << endl << "Time : " << 1.0 * clock() / CLOCKS_PER_SEC << " s." << endl;
      #endif // ONLINE_JUDGE
}


Measured memory_bytes: 101736