#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n & 1)
    cout << "No\n";
  else {
    int cnt = 0;
    for (int i = 0; i < n; ++i) {
      if (s[i] == '(')
        ++cnt;
      else
        --cnt;
      if (cnt == -2) {
        cout << "No\n";
        exit(0);
      }
    }
    if (cnt == 0)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
