import Foundation

func isFull(_ s: String) -> Bool {
  var c: Int = 0
  for si in s {
    switch si {
    case "(": c += 1
    case ")" where c < 1 : return false
    case ")": c -= 1
    default:  break
    }
  }
  return c == 0
}

extension String {
  func suffix(_ cond: (Character) -> Bool) -> String {
    let a = Array(self)
    var c = ""
    for i in 0..<a.count {
      if cond(a[a.count - i - 1]) {
        c.append(a[a.count - i - 1])
      } else {
        return c
      }
    }
    return c
  }
}

let nl = readLine()!.split(separator: " ").map { Int($0)! }
let n = nl[0]
var l = [(String, Int, Int)]()
var r = [(String, Int, Int)]()
for _ in (0..<n) {
  let si = readLine()!
  let ai = si.prefix { $0 == ")" }.count - si.prefix { $0 == "(" }.count
  let bi = si.suffix { $0 == "(" }.count - si.suffix { $0 == ")" }.count
  if bi - ai >= 0 {
    l.append((si, ai, bi))
  } else {
    r.append((si, ai, bi))
  }
}

l.sort { $0.1 < $1.1 }
r.sort { $0.2 > $1.2 }
print("\(isFull(l.map{$0.0}.joined() + r.map{$0.0}.joined()) ? "Yes": "No")")