import std;

int[] parse0(string s) {
    int n = cast(int)s.length;

    int a = 0;
    for (int i = 0; i < n; i += 2) {
        if (i+1 < n && s[i] == '(' && s[i+1] == ')') {
            a += 2;
        } else break;
    }

    auto t = s[a..$];
    n = cast(int)t.length;
    int b = 0;
    for (int i = n-1; i >= 0; i -= 2) {
        if (i-1 >= 0 && t[i-1] == '(' && t[i] == ')') {
            b += 2;
        } else break;
    }

    t = t[0..$-b];

    if (t.length > 1 && t[0] == '(' && t[$-1] == ')') {
        int k = 0;
        for (int i = 0; i < t.length; i++) {
            if (t[i] == '(') {
                k++;
            }
            else if (t[i] == ')') {
                if (k == 0) return null;
                k--;
            }
        }
        if (k != 0) return null;
        return [0, 0];
    }


    return parse(t);
}

int[] parse(string s) {
    int n = cast(int)s.length;

    int a = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == ')') a++;
        else break;
    }

    int b = 0;
    for (int i = n - 1; i >= 0; i--) {
        if (s[i] == '(') b++;
        else break;
    }

//    writeln(a, " ", b);
//    if (a + b == s.length) return [a, b];

    auto t = s[a..$-b];
    int k = 0;
    for (int i = 0; i < t.length; i++) {
        if (t[i] == '(') {
            k++;
        }
        else if (t[i] == ')') {
            if (k == 0) return null;
            k--;
        }
    }
    if (k != 0) return null;
    return [a, b];
}

bool calc(string[] ss) {
    long a = 0;
    long b = 0;
    bool left = false;
    bool right = false;
    foreach (s; ss) {
        auto x = parse0(s);
        if (x == null) return false;

        a += x[0];
        b += x[1];
        if (x[0] > 0 && x[1] == 0) left = true;
        if (x[0] == 0 && x[1] > 0) right = true;
    }

    if (a == 0 && b == 0) return true;
    return left && right && a == b;
}

void main() {
    int n; scan(n);
    string[] ss;
    foreach (_; 0..n) {
        ss ~= read;
    }
    writeln(calc(ss) ? "Yes" : "No");
}

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T=string)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readints = reads!int;
