import java.util.*

class Scanner(`in`: java.io.InputStream) {
    private val reader = java.io.BufferedReader(java.io.InputStreamReader(`in`))
    private var tokenizer: StringTokenizer? = null

    fun next(): String {
        if (tokenizer?.hasMoreTokens() != true) {
            tokenizer = StringTokenizer(reader.readLine())
        }
        return tokenizer!!.nextToken()
    }

    fun nextLine(): String {
        return if (tokenizer?.hasMoreTokens() != true) {
            reader.readLine()
        } else tokenizer!!.nextToken("\n")
    }
}

fun main(args: Array<String>) {
    val pw = java.io.PrintWriter(System.out)
    Problem.solve(Scanner(System.`in`), pw)
    pw.flush()
}

////////////////////////////////////////////////////////////////////////

fun dprint(v: Any?, indent: Int = 0) {
    val indentStr = (1..indent).joinToString("") { " " }
    when (v) {
        is Iterable<*> -> {
            System.err.println("$indentStr[")
            v.forEach { dprint(it, indent + 1) }
            System.err.println("$indentStr]")
        }
        is Array<*> -> {
            System.err.println("$indentStr[")
            v.forEach { dprint(it, indent + 1) }
            System.err.println("$indentStr]")
        }
        is IntArray -> System.err.println(indentStr + "[" + v.joinToString(",") + "]")
        is LongArray -> System.err.println(indentStr + "[" + v.joinToString(",") + "]")
        is DoubleArray -> System.err.println(indentStr + "[" + v.joinToString(",") + "]")
        else -> System.err.println(indentStr + v)
    }
}

fun <A : Comparable<A>> min(a: A, b: A) = if (a < b) a else b
fun <A : Comparable<A>> min(vararg a: A) = a.reduce { acc, x -> min(acc, x) }
fun <A : Comparable<A>> max(a: A, b: A) = if (a > b) a else b
fun <A : Comparable<A>> max(vararg a: A) = a.reduce { acc, x -> max(acc, x) }

////////////////////////////////////////////////////////////////////////

object Problem {
    fun solve(sc: Scanner, pw: java.io.PrintWriter) {
        val N = sc.next().toInt()
        val S = Array(N) { sc.next() }
        val S1 = mutableListOf<Pair<Long, Long>>()
        val S2 = mutableListOf<Pair<Long, Long>>()
        S.forEach { s ->
            var min = 0L
            var sum = 0L
            s.forEach { c ->
                if (c == '(') sum++ else sum--
                if (min > sum) min = sum
            }
            when {
                sum >= 0 -> S1.add(Pair(sum, min))
                else -> S2.add(Pair(-sum, min - sum))
            }
        }
        S1.sortBy { -it.second }
        S2.sortBy { -it.second }
        val check1 = check(S1)
        val check2 = check(S2)
        if (check1 >= 0 && check2 >= 0 && check1 == check2) {
            pw.println("Yes")
        } else {
            pw.println("No")
        }
    }

    private fun check(a: List<Pair<Long, Long>>): Long {
        var n = 0L
        a.forEach {
            val sum = it.first
            val min = it.second
            if (n + min < 0) {
                return -1
            }
            n += sum
        }
        return n
    }
}
