import java.util.Stack

fun main(args: Array<String>) {
  val m = readLine()!!.toInt()
  val s = mutableListOf<Pair<Int, Int>>()
  repeat(m) {
    val t = readLine()!!
    if (!t.isCompleteBracketSequence()) {
      val u = t.extractIncompleteBracketSequence()
      s.add(u.toPair())
    }
  }
  val ok = run {
    if (s.sumBy { it.second } != 0) return@run false
    val pos = mutableListOf<Pair<Int, Int>>()
    val neg = mutableListOf<Pair<Int, Int>>()
    for (p in s) {
      if (p.second < 0) neg.add(p) else pos.add(p)
    }
    pos.sortByDescending { it.first }
    var level = 0
    for (p in pos) {
      if (level+p.first < 0) return@run false
      level += p.second
    }
    neg.sortByDescending { it.second-it.first }
    for (p in neg) {
      if (level+p.first < 0) return@run false
      level += p.second
    }
    true
  }
  println(if (ok) "Yes" else "No")
}
fun String.toPair(): Pair<Int, Int> {
  var min = 0
  var tot = 0
  for (char in this) {
    tot += if (char == '(') 1 else -1
    min = minOf(min, tot)
  }
  return min to tot
}
fun String.isCompleteBracketSequence(): Boolean {
  var level = 0
  for (char in this) {
    level += if (char == '(') 1 else -1
    if (level < 0) return false
  }
  return level == 0
}
fun String.extractIncompleteBracketSequence(): String {
  val stack = Stack<Char>()
  for (char in this) {
    if (char == ')' && stack.isNotEmpty() && stack.peek() == '(') {
      stack.pop()
    } else {
      stack.push(char)
    }
  }
  var res = ""
  while (stack.isNotEmpty()) res = stack.pop()!! + res
  return res
}