import java.io.BufferedReader
import java.io.InputStreamReader
import kotlin.math.min

fun main(omkar: Array<String>) {
    val jin = BufferedReader(InputStreamReader(System.`in`))
    val n = jin.readLine().toInt()
    val bracketLists = Array(2) { mutableListOf<Bracket>() }
    var overall = 0
    for (j in 1..n) {
        val s = jin.readLine()
        val delta = (2 * s.count { it == '(' }) - s.length
        overall += delta
        if (delta >= 0) {
            var m = 0
            var curr = 0
            for (chara in s) {
                when (chara) {
                    '(' -> curr++
                    ')' -> curr--
                }
                m = min(m, curr)
            }
            bracketLists[0].add(Bracket(delta, m))
        } else {
            var m = 0
            var curr = 0
            for (chara in s.reversed()) {
                when (chara) {
                    ')' -> curr++
                    '(' -> curr--
                }
                m = min(m, curr)
            }
            bracketLists[1].add(Bracket(-delta, m))
        }
    }
    if (overall != 0) {
        println("No")
        return
    }
    for (brackets in bracketLists) {
        brackets.sortByDescending { it.min }
        var curr = 0
        for (bracket in brackets) {
            if (curr + bracket.min < 0) {
                println("No")
                return
            }
            curr += bracket.delta
        }
    }
    println("Yes")
}

data class Bracket(val delta: Int, val min: Int)