import java.util.Scanner
import kotlin.math.*
import kotlin.system.exitProcess

fun main() {
    val scn = Scanner(System.`in`)
    val n = scn.nextInt()
    val pre = mutableListOf<Pair<Int, Int>>()
    val q = mutableListOf<Pair<Int, Int>>()
    repeat(n){
        val s = scn.next().map {c -> if (c=='(') 1 else -1}
        var min = Integer.MAX_VALUE
        var sum = 0
        s.forEach {
            sum += it
            min = min(sum, min)
        }
        val p = Pair(min, sum)
        if (sum>=0) pre.add(p)
        else q.add(p)
    }
    pre.sortByDescending { it.first }
    q.sortBy{it.first-it.second}

    var sum = 0
    for ((m, f) in pre){
        if (sum+m<0) no()
        sum += f
    }
    for ((m, f) in q){
        if (sum+m<0) no()
        sum += f
        if (sum<0) no()
    }

    println(if (sum==0) "Yes" else "No")
}

fun no() {
    println("No")
    exitProcess(0)
}