import Foundation

func suffix(_ s: String, e: Character) -> Int {
  let a = Array(s)
  var c = 0
  for i in 0..<a.count {
    if a[a.count - i - 1] == e {
      c += 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 = suffix(si, e: "(") - suffix(si, e: ")")
  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("Yes")