#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<limits.h>
#define MOD 1000000007

int *array;

int min(int a, int b) {
    return a<b?a:b;
}

int max(int a, int b) {
    return a>b?a:b;
}

int compare(const void* a, const void* b) {
    return *(int*)a-*(int*)b;
}

int cmp(const void *a, const void *b){
    int ia = *(int *)a;
    int ib = *(int *)b;
    return array[ia] < array[ib] ? -1 : array[ia] > array[ib];
}

int abs(int n) {
    if(n < 0)
        return n*(-1);
    return n;
}

void swap(int *a, int *b) {
    *a = (*a)^(*b);
    *b = (*a)^(*b);
    *a = (*a)^(*b);
}

int binSearch(int a[], int x, int l, int r) {
    if(r >= l) {
        int mid = l + ((r-l)>>1);
        if(a[mid] == x)
            return mid;
        if(a[mid] > x) {
            return binSearch(a, x, l, mid-1);
        }
        else if(a[mid] < x) {
            return binSearch(a, x, mid+1, r);
        }
    }
    return -1;
}

void testCase() {
    int i, n;
    if(scanf("%d", &n)) {
        char s[1000001];
        int open=0, close=0;
        for(i=0;i<n;i++) {
            int x=0, y=0;
            if(scanf("%s", s));
            int j=0;
            for(int k=0;s[k];k++) {
                if(s[k] == '(') {
                    j++;
                }
                else if(s[k] == ')') {
                    if(j > 0) {
                        j--;
                    }
                    else {
                        x++;
                    }
                }
            }
            y += j;
            if(i == 0) {
                open = y;
                close = x;
            }
            else {
                if(x == 0 && y != 0) {
                    close -= y;
                    if(close < 0) {
                        close=0;
                        open += (y-close);
                    }
                }
                else if(x != 0 && y == 0) {
                    open -= x;
                    if(open < 0) {
                        open=0;
                        close += (y-open);
                    }
                }
                else {
                    open += y;
                    close += x;
                }
            }
        }
        if(open == 0 && close == 0) {
            printf("Yes");
        }
        else
            printf("No");
    }
}

int main() {
    int t=1;
    // scanf("%d", &t);
    while(t--) {
        testCase();
        printf("\n");
    }
    return 0;
}