import Foundation

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

func subRecursively(_ s: String, e: String) -> String {
  var s = s
  if let regex = try? NSRegularExpression(pattern: e) {
    while let _ = regex.firstMatch(in: s, range: NSRange(s.startIndex..., in: s)) {
      s = s.replacingOccurrences(of: e, with: "", options: .regularExpression, range: s.range(of: s))
    }
  }
  return s
}

func patternLength(_ s: String, e: String) -> Int {
  if let regex = try? NSRegularExpression(pattern: e),
    let r = regex.firstMatch(in: s, range: NSRange(s.startIndex..., in: s)) {
    return r.range.length
  }
  return 0
}

let nl = readLine()!.split(separator: " ").map { Int($0)! }
let n = nl[0]
var s = [String]()
for _ in (0..<n) {
  let si = readLine()!
  if !isFull(si) {
    s.append(subRecursively(si, e: "\\(\\)"))
  }
}

let e = "^\\(+"
s.sort { patternLength($0, e: e) > patternLength($1, e: e) }
print("\(isFull(s.joined()) ? "Yes": "No")")