//This template belongs to Juan Carlo Vieri
#include <bits/stdc++.h>
using namespace std;

typedef int_fast64_t ll;
typedef long double ld;
typedef int_fast32_t intt;
typedef int_fast32_t tmp_m;
#define deb(x) cout << #x << ' ' << x << endl
#define rep(i, cmp1, cmp2) for (tmp_m i = cmp1; i < cmp2; ++i)
#define repp(i, cmp1, cmp2) for (tmp_m i = cmp1; i >= cmp2; --i)
#define pb push_back
#define st stack
#define pa pair
#define vc vector
#define qu queue
#define pq priority_queue
#define fr first
#define sc second
#define mp map
const ld pi = acos(-1.0);
const intt mod = 1e9 + 7;

struct pr {
  intt x;
  intt y;
  intt dst;
  pr() {}
  pr(intt x, intt y, intt dst) : x(x), y(y), dst(dst) {}
  inline bool operator<(const pr& cmp2) const {
    if (dst != cmp2.dst) return dst < cmp2.dst;
    if (x != cmp2.x) return x < cmp2.x;
    return y < cmp2.y;
  }
  inline bool operator==(const pr& cmp2) const {
    return (cmp2.dst == dst) && (cmp2.x == x) && (cmp2.y == y);
  }
  inline bool operator>(const pr& cmp2) const {
    if (dst != cmp2.dst) return dst > cmp2.dst;
    if (x != cmp2.x) return x > cmp2.x;
    return y > cmp2.y;
  }
};

struct point {
  intt min;
  intt tot;
  point() {}
  point(intt min, intt tot) : min(min), tot(tot) {}
  inline bool operator<(const point& cmp2) const {
    if (cmp2.min != min) return cmp2.min < min;
    return cmp2.tot < tot;
  }
  inline bool operator==(const point& cmp2) const {
    return (cmp2.min == min) && (cmp2.tot == tot);
  }
  inline bool operator>(const point& cmp2) const {
    if (cmp2.min != min) return cmp2.min > min;
    return cmp2.tot > tot;
  }
};

class prHash {
 public:
  size_t operator()(const pr& cmp1) const {
    return (hash<intt>()(cmp1.x)) ^ (hash<intt>()(cmp1.y)) ^
           (hash<intt>()(cmp1.dst));
  }
};

class pointHash {
 public:
  size_t operator()(const point& cmp1) const {
    return (hash<intt>()(cmp1.min)) ^ (hash<intt>()(cmp1.tot));
  }
};

inline bool spoint(const point& cmp1, const point& cmp2) {
  // swap(cmp1, cmp2);
  if (cmp1.min != cmp2.min) return cmp1.min > cmp2.min;
  return cmp1.tot > cmp2.tot;
}

inline bool spr(const pr& cmp1, const pr& cmp2) {
  // swap(cmp1, cmp2);
  if (cmp1.dst != cmp2.dst) return cmp1.dst < cmp2.dst;
  if (cmp1.x != cmp2.x) return cmp1.x < cmp2.x;
  return cmp1.y < cmp2.y;
}

intt cek(const vc<point>& v){
  intt cur = 0;
  rep(i, 0, (intt)v.size()){
    if(v[i].min + cur < 0){
      puts("No");
      return 0;
    }
    cur += v[i].tot;
  }
  return 1;
}

void solve() {
  intt n;
  cin >> n;
  intt counter = 0;
  vc<point> pos;
  vc<point> neg;
  rep(i, 0, n){
    string s;
    cin >> s;
    intt mini = 1e9;
    intt tot = 0;
    rep(i, 0, (intt)s.length()){
      mini = min(mini, tot);
      if(s[i] == '(')++tot;
      else --tot;
      mini = min(mini, tot);
    }
    counter += tot;
    if(tot >= 0){
      pos.pb({mini, tot});
      continue;
    }
    mini = 1e9;
    tot = 0;
    repp(i, (intt)s.length() - 1, 0){
      mini = min(mini, tot);
      if(s[i] == ')')++tot;
      else --tot;
      mini = min(mini, tot);
    }
    neg.pb({mini, tot});
    assert(tot > 0);
  }
  if(counter != 0){
    puts("No");
    return;
  }
  sort(pos.begin(), pos.end(), spoint);
  if(cek(pos) == 0)return;
  sort(neg.begin(), neg.end(), spoint);
  if(cek(neg) == 0)return;
  puts("Yes");
}

void init() {
  // remove if interactive
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  srand(time(0));
  // memset(dp, -1, sizeof dp);
}

int main() {
  init();
  solve();
  return 0;
}


Measured memory_bytes: 19008