/**
 *    author:  math2do
 *    created: 14.05.2020 03:01:55 IST
**/

#include <bits/stdc++.h>

using namespace std;

template <typename A, typename B>
string to_string(pair<A, B> p);
 
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
 
string to_string(const string& s) {
  return '"' + s + '"';
}
 
string to_string(const char* s) {
  return to_string((string) s);
}
 
string to_string(bool b) {
  return (b ? "true" : "false");
}

string to_string(const char &ch) {
  return "'" + string(1, ch) + "'";
}

string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
 
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  reverse(res.begin(), res.end());
  return res;
}

template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
 
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
 
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

void debug_out() { cerr << endl; }
 
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
 
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector <string> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  } 
  auto modify = [&] (string &str) -> string {
    stack <char> st;
    for (char ch : str) {
      if (ch == '(' || st.empty()) {
        st.push(ch);
      } else {
        if (st.top() == '(') {
          st.pop();
        } else {
          st.push(ch);
        } 
      } 
    }
    string ret;
    while (!st.empty()) {
      ret.push_back(st.top());
      st.pop();
    } 
    reverse(ret.begin(), ret.end());
    return ret;
  }; 
  auto count = [&] (string &str) {
    pair <int, int> cnt = {0, 0};
    for (char ch : str) {
      cnt.first += (ch == '(');
      cnt.second += (ch == ')');
    } 
    return cnt;
  };
  vector <tuple <string, int, int> > mod;
  vector <string> open;
  vector <string> close;
  auto all = [&] (string &str, char with) -> bool {
    for (char ch : str) {
      if (ch != with) {
        return false;
      } 
    } 
    return true;
  };
  for (int i = 0; i < n; i++) {
    string ret = modify(arr[i]);
    if (!ret.empty()) {
      if (all(ret, '(')) {
        open.push_back(ret);
        continue;
      } 
      if (all(ret, ')')) {
        close.push_back(ret);
        continue;
      } 
      pair <int, int> cnt = count(ret);
      mod.emplace_back(ret, cnt.first, cnt.second);
    }
  } 
  auto comp = [&] (auto &ta, auto &tb) {
    pair <int, int> a = {get <1> (ta), get <2> (ta)};
    pair <int, int> b = {get <1> (tb), get <2> (tb)};
    if (a.first > a.second && b.first > b.second) {
      return a.second < b.second;
    } 
    return a.first - a.second > b.first - b.second;
  };
  sort(mod.begin(), mod.end(), comp);
  string final = "";
  for (string &str : open) {
    final += str;
  } 
  for (auto tp : mod) {
    final += get <0> (tp);
  }
  for (string &str : close) {
    final += str;
  }
  auto okay = [&] (string &str) -> bool {
    stack <char> st;
    for (char ch : str) {
      if (ch == '(') {
        st.push(ch);
      } else {
        if (st.empty()) {
          return false;
        }
        st.pop();
      } 
    }
    return st.empty();
  };
  if (okay(final)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  } 
  return 0;
}


Measured memory_bytes: 68656