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.*;
    import java.util.*;
    @SuppressWarnings("Duplicates")
    // author @mdazmat9
    public class codeforces{
        static Scanner sc = new Scanner(System.in);
        static PrintWriter out = new PrintWriter(System.out);
        public static void main(String[] args) throws IOException {
            int test = 1;
            //test=sc.nextInt();
            for (int ind = 0; ind < test; ind++) {
                solve();
            }
            out.flush();
        }
        static void solve(){
          int n=sc.nextInt();
          String s=sc.next();
          int o=0,c=0;
          for(int i=0;i<n;i++){
              if(s.charAt(i)=='(')o++;
              else c++;
          }
          if(o!=c){
              out.println("NO");
              return;
          }
        Stack<Character> st=new Stack<>();
        int error=0;
       
        for(int i=0;i<n;i++){
            if(s.charAt(i)=='('){
                st.push('a');
            }
            else{
                if(st.size()==0){
                    error++;
                }
                else{
                    st.pop();
                }
            }
        }
        if(error==0){
            out.println("YES");
            return;
        }
        if(error==1&& st.size()==1){
            out.println("YES");
            return;
        }
        out.println("NO");
      
          }
     
     
     
        static int[] intarray(int n){ int [] a=new int[n];for(int i=0;i<n;i++)a[i]=sc.nextInt();return a; }
        static void sort(int[]a){ shuffle(a);Arrays.sort(a);}
        static void sort(long[]a){ shuffle(a);Arrays.sort(a);}
        static long[] longarray(int n){ long [] a=new long[n];for(int i=0;i<n;i++)a[i]=sc.nextLong();return a; }
        static ArrayList<Integer> intlist(int n){ArrayList<Integer> list=new ArrayList<>();for(int i=0;i<n;i++)list.add(sc.nextInt());return list; }
        static ArrayList<Long> longlist(int n){ArrayList<Long> list=new ArrayList<>();for(int i=0;i<n;i++)list.add(sc.nextLong());return list; }
        static int[][] int2darray(int n,int m){ int [][] a=new int[n][m];for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ a[i][j]=sc.nextInt(); } }return a; }
        static long[][] long2darray(int n,int m){ long [][] a=new long[n][m];for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ a[i][j]=sc.nextLong(); } }return a; }
        static char[][] char2darray(int n,int m){ char [][] a=new char[n][m];for(int i=0;i<n;i++){ String s=sc.next(); a[i]=s.toCharArray(); }return a; }
     
        static double pi=3.14159265358979323846264;
        public static double logb( double a, double b ) {return Math.log(a) / Math.log(b); }
        static long fast_pow(long a, long b,long abs) {
            if(b == 0) return 1L;
            long val = fast_pow(a, b / 2,abs);
            if(b % 2 == 0) return val * val % abs;
            else return val * val % abs * a % abs;
        }
        static long abs = (long)1e9 + 7;
        static   void shuffle(int[] a) { int n = a.length;for(int i = 0; i < n; i++) { int r = i + (int) (Math.random() * (n - i));int tmp = a[i];a[i] = a[r];a[r] = tmp; } }
        static   void shuffle(long[] a) { int n = a.length;for(int i = 0; i < n; i++) { int r = i + (int) (Math.random() * (n - i));long tmp = a[i];a[i] = a[r];a[r] = tmp; } }
        static long gcd(long a , long b) {
            if(b == 0) return a;
            return gcd(b , a % b);
        }
    }
     
    class Scanner {
        public BufferedReader reader;
        public StringTokenizer st;
        public Scanner(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            st = null;
        }
        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String line = reader.readLine();
                    if (line == null) return null;
                    st = new StringTokenizer(line);
                } catch (Exception e) {
                    throw (new RuntimeException());
                }
            }
            return st.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }