Problem: Petya's friends made him a birthday present — a bracket sequence. Petya was quite disappointed with his gift, because he dreamed of correct bracket sequence, yet he told his friends nothing about his dreams and decided to fix present himself. 

To make everything right, Petya is going to move at most one bracket from its original place in the sequence to any other position. Reversing the bracket (e.g. turning "(" into ")" or vice versa) isn't allowed. 

We remind that bracket sequence s is called correct if: 

  * s is empty; 
  * s is equal to "(t)", where t is correct bracket sequence; 
  * s is equal to t_1 t_2, i.e. concatenation of t_1 and t_2, where t_1 and t_2 are correct bracket sequences. 



For example, "(()())", "()" are correct, while ")(" and "())" are not. Help Petya to fix his birthday present and understand whether he can move one bracket so that the sequence becomes correct.

Input

First of line of input contains a single number n (1 ≤ n ≤ 200 000) — length of the sequence which Petya received for his birthday.

Second line of the input contains bracket sequence of length n, containing symbols "(" and ")".

Output

Print "Yes" if Petya can make his sequence correct moving at most one bracket. Otherwise print "No".

Examples

Input


2
)(


Output


Yes


Input


3
(()


Output


No


Input


2
()


Output


Yes


Input


10
)))))(((((


Output


No

Note

In the first example, Petya can move first bracket to the end, thus turning the sequence into "()", which is correct bracket sequence.

In the second example, there is no way to move at most one bracket so that the sequence becomes correct.

In the third example, the sequence is already correct and there's no need to move brackets.

Solution (in JAVA):

Solution:
import java.io.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.IntStream;

import static java.lang.Character.isDigit;

public class Laba {
    FScanner fs;
    PrintWriter pw;
    int n, m;
    boolean[] used;
    int[][] dst;
    long[] t;
    HashMap<String, HashMap<String, Integer>> g;
    HashSet<Character> goods = new HashSet<>();

    public static void main(String[] args) throws IOException {
        new Laba().start();
    }

    public void start() throws IOException {
        fs = new FScanner(new InputStreamReader(System.in));
        // reader = new FScanner(new FileReader("input"));
        //pw = new PrintWriter("input.txt");
        pw = new PrintWriter(System.out);
        int n = fs.nextInt();
        char[] arr = fs.nextLine().toCharArray();
        int depth = 0;
        int ch = 0;
        int sw = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == '(') {
                depth++;
            } else {
                depth--;
            }
            if (depth < -1) {
                System.out.println("NO");
                System.exit(0);
            }
            if (depth == -1 && ch == 0) {
                ch = 1;
                depth = 0;
            } else if (depth == -1) {
                System.out.println("NO");
                System.exit(0);
            }
        }
       // System.out.println(depth + " " + ch);
        if (depth == 0 && ch == 0 || depth == 1 && ch == 1) {
            pw.println("YES");
        } else pw.println("NO");
        pw.close();
    }


    void build(long a[], int v, int tl, int tr) {
        if (tl == tr)
            t[v] = a[tl];
        else {
            int tm = (tl + tr) / 2;
            build(a, v * 2, tl, tm);
            build(a, v * 2 + 1, tm + 1, tr);
            t[v] = t[v * 2] + t[v * 2 + 1];
        }
    }

    void update(int v, int tl, int tr, int pos, long new_val) {
        if (tl == tr)
            t[v] = new_val;
        else {
            int tm = (tl + tr) / 2;
            if (pos <= tm)
                update(v * 2, tl, tm, pos, new_val);
            else
                update(v * 2 + 1, tm + 1, tr, pos, new_val);
            t[v] = t[v * 2] + t[v * 2 + 1];
        }
    }

    long sum(int v, int tl, int tr, int l, int r) {
        if (l > r)
            return 0;
        if (l == tl && r == tr)
            return t[v];
        int tm = (tl + tr) / 2;
        return sum(v * 2, tl, tm, l, Math.min(r, tm))
                + sum(v * 2 + 1, tm + 1, tr, Math.max(l, tm + 1), r);
    }

    int findss(int v, int tl, int tr, long sum) {
        if (sum > t[v])
            return -1;
        if (tl == tr)
            return tl;
        int tm = (tl + tr) / 2;
        if (t[v * 2] > sum) {
            return findss(v * 2, tl, tm, sum);
        } else {
            return findss(v * 2 + 1, tm + 1, tr, sum - t[v * 2]);
        }
    }

}

class Pair {
    int x, y;

    Pair(int x1, int y1) {
        x = x1;
        y = y1;
    }
}

class pair {
    long x, y, c;

    pair(long x1, long y1) {
        x = x1;
        y = y1;
    }
}

class FScanner {
    StringTokenizer st;
    BufferedReader reader;

    FScanner(InputStreamReader isr) throws IOException {
        reader = new BufferedReader(isr);
    }

    String nextLine() throws IOException {
        return reader.readLine();
    }

    String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String s = reader.readLine();
            if (s == null)
                return null;
            st = new StringTokenizer(s);
        }
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    char nextChar() throws IOException {
        return (char) reader.read();
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    int[] iarr(int n) throws IOException {
        int[] mas = new int[n];
        for (int i = 0; i < n; i++)
            mas[i] = nextInt();
        return mas;
    }

    double[] darr(int n) throws IOException {
        double[] mas = new double[n];
        for (int i = 0; i < n; i++)
            mas[i] = nextDouble();
        return mas;
    }

    char[][] cmas2(int n, int m) throws IOException {
        char[][] mas = new char[n][m];
        for (int i = 0; i < n; i++)
            mas[i] = nextLine().toCharArray();
        return mas;
    }

    long[] larr(int n) throws IOException {
        long[] mas = new long[n];
        for (int i = 0; i < n; i++)
            mas[i] = nextLong();
        return mas;
    }
}