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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
bool isPrime(long long int x) {
  if (x <= 4 || x % 2 == 0 || x % 3 == 0) return x == 2 || x == 3;
  for (int i = 5; i * i <= x; i += 6)
    if (x % i == 0 || x % (i + 2) == 0) return 0;
  return 1;
}
void primeFactors(long long n, set<long long> &Fac) {
  while (n % 2 == 0) {
    Fac.insert(2);
    n = n / 2;
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      Fac.insert(i);
      n = n / i;
    }
  }
  if (n > 2) Fac.insert(n);
}
int NumDigits(int x) {
  return (
      x < 10
          ? 1
          : (x < 100
                 ? 2
                 : (x < 1000
                        ? 3
                        : (x < 10000
                               ? 4
                               : (x < 100000
                                      ? 5
                                      : (x < 1000000
                                             ? 6
                                             : (x < 10000000
                                                    ? 7
                                                    : (x < 100000000
                                                           ? 8
                                                           : (x < 1000000000
                                                                  ? 9
                                                                  : 10)))))))));
}
inline void boostIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout.precision(10);
}
long long int Pow10[19] = {
    (long long int)0,    (long long int)1e1,  (long long int)1e2,
    (long long int)1e3,  (long long int)1e4,  (long long int)1e5,
    (long long int)1e6,  (long long int)1e7,  (long long int)1e8,
    (long long int)1e9,  (long long int)1e10, (long long int)1e11,
    (long long int)1e12, (long long int)1e13, (long long int)1e14,
    (long long int)1e15, (long long int)1e16, (long long int)1e17,
    (long long int)1e18};
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a * b / gcd(a, b);
}
long long MOD = 1e9 + 7;
template <class T>
struct Fenwick {
  vector<T> V;
  Fenwick(long long n) : V(n) {}
  void add(size_t i, T x) {
    for (; i < V.size(); i |= i + 1) V[i] += x;
  }
  T sum(long long i) {
    T r = T();
    for (--i; i >= 0; i = (i & (i + 1)) - 1) r += V[i];
    return r;
  }
  T sum(long long l, long long r) { return sum(r) - sum(l); }
};
long long f_Minimum(long long a, long long b) { return (min(a, b)); }
long long f_Maximum(long long a, long long b) { return (max(a, b)); }
long long f_Summarize(long long a, long long b) { return (a + b); }
class Parameter {
 public:
  long long InitialValue;
  long long (*Function)(long long a, long long b);
  Parameter(long long (*f)(long long a, long long b), long long value) {
    Function = f;
    InitialValue = value;
  }

 private:
};
Parameter Minimum(f_Minimum, 9223372036854775807);
Parameter Maximum(f_Maximum, -9223372036854775807);
Parameter Summarize(f_Summarize, 0);
class SegmentTree {
 public:
  SegmentTree(long long size, Parameter p) {
    Function = p.Function;
    InitialValue = p.InitialValue;
    n = size;
    data = vector<long long>(2 * n, 0);
  }
  SegmentTree(vector<long long> array, Parameter p) {
    Function = p.Function;
    InitialValue = p.InitialValue;
    n = array.size();
    ;
    data = vector<long long>(2 * n, 0);
    for (long long i = 0; i < (n); ++i) {
      data[n + i] = array[i];
    }
    for (long long i = n - 1; i >= 1; ++i) {
      data[i] = Function(data[i * 2], data[i * 2] + 1);
    }
  }
  void Update(long long idx, long long value) {
    idx += n;
    data[idx] = value;
    while (idx > 1) {
      idx /= 2;
      data[idx] = Function(data[idx * 2], data[idx * 2 + 1]);
    }
  }
  long long Find(long long left, long long right) {
    left += n;
    right += n;
    long long value = InitialValue;
    while (left < right) {
      if (left % 2 == 1) {
        value = Function(left, value);
        left++;
      }
      if (right % 2 == 1) {
        value = Function(right, value);
        right--;
      }
      left /= 2;
      right /= 2;
    }
    return value;
  }

 private:
  long long n;
  vector<long long> data;
  long long (*Function)(long long a, long long b);
  long long InitialValue;
};
int32_t main() {
  boostIO();
  long long n;
  cin >> n;
  if (n % 2 == 1) {
    cout << "No" << '\n';
    return 0;
  }
  string S;
  cin >> S;
  vector<long long> A(n);
  for (long long i = 0; i < (n); ++i) {
    if (S[i] == '(') {
      A[i] = 1;
    } else {
      A[i] = -1;
    }
  }
  long long v = 0;
  long long b = n;
  for (long long i = 0; i < (n); ++i) {
    v += A[i];
    if (v < 0) {
      b = i;
      break;
    }
  }
  v = 0;
  long long e = -1;
  for (long long i = n - 1; i >= 0; --i) {
    v += A[i];
    if (v > 0) {
      e = i;
      break;
    }
  }
  if (b < e) {
    vector<long long> AA(0);
    for (long long i = 0; i < (n); ++i) {
      if (i == e) {
        continue;
      } else if (i == b) {
        AA.push_back(A[e]);
        AA.push_back(A[b]);
      } else {
        AA.push_back(A[i]);
      }
    }
    A = AA;
  }
  v = 0;
  for (long long i = 0; i < (n); ++i) {
    v += A[i];
    if (v < 0) {
      cout << "No" << '\n';
      return 0;
    }
  }
  v = 0;
  for (long long i = n - 1; i >= 0; --i) {
    v += A[i];
    if (v > 0) {
      cout << "No" << '\n';
      return 0;
    }
  }
  cout << "Yes" << '\n';
  cerr << '\n' << "RUNTIME: " << 1.0 * clock() / CLOCKS_PER_SEC << " s" << '\n';
  return 0;
  ;
}