import java.util.*

fun main(args:Array<String>?): Unit {
    val n = readLine()!!.trim().toInt()
    val str = Array(n){countMinAndSum(readLine()!!.trim())}
    val plus = PriorityQueue<Pair<Int, Int>>(compareBy(Pair<Int, *>::first).reversed())
    val minus = PriorityQueue<Pair<Int, Int>>(compareBy{ (min, count) -> min - count })
    var last = 0
    for ((min, count) in str){
        if (min >= 0){
            last += count
        }else if (count > 0) {
            plus.add(Pair(min, count))
        }else {
            minus.add(Pair(min, count))
        }
    }
    while(plus.isNotEmpty() && plus.peek().first >= -last){
        last += plus.poll().second
    }
    while(minus.isNotEmpty() && minus.peek().first >= -last && minus.peek().second >= -last){
        last += minus.poll().second
    }
    println(if (plus.isEmpty() && minus.isEmpty() && last == 0) "Yes" else "No")
}
fun countMinAndSum(str: String): Pair<Int, Int> {
    var count = 0
    var min = 0
    for (c in str){
        when(c){
            '(' -> ++count
            ')' -> {
                --count
                if (min > count) min = count
            }
        }
    }
    return Pair(min, count)
}

