#include <bits/stdc++.h>
using namespace std;
char arr[20000000];
int main() {
  int n;
  cin >> n;
  int head = 0;
  for (int i = 0; i < n; ++i) {
    char c;
    cin >> c;
    if (!i)
      arr[head++] = c;
    else {
      if (c == ')') {
        if (arr[head - 1] == '(')
          head--;
        else
          arr[head++] = c;
      } else if (c == '(') {
        arr[head++] = c;
      }
    }
  }
  if (head == 1 || head > 2) {
    cout << "No" << endl;
  } else if (head == 2) {
    if (arr[0] == ')' && arr[1] == '(') {
      cout << "Yes" << endl;
    } else
      cout << "No" << endl;
  } else
    cout << "Yes" << endl;
  return 0;
}
