#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  long long i, j, l, c, k, v, n, m, r, t;
  long long x1, x2, y1, y2, x3, x4, x5, x6;
  double dd[300];
  string s, s1, s2, s3;
  cin >> n;
  cin >> s;
  c = 0;
  v = 0;
  r = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == ')') {
      v++;
    } else
      c++;
    if (v > c && r <= 1) {
      r++;
      s += ')';
      n++;
      v--;
    }
  }
  if (r > 1 || c != v || s[n - 1] == '(')
    cout << "No";
  else
    cout << "Yes";
}
