#include <bits/stdc++.h>
using namespace std;
string st;
queue<char> q;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n, i, fg;
  cin >> n >> st;
  if (n & 1)
    cout << "No" << endl;
  else {
    fg = 0;
    for (i = 0; i < n; i++) {
      if (st[i] == '(')
        q.push('(');
      else {
        if (q.size() > 0)
          q.pop();
        else {
          if (fg == 2) {
            cout << "No" << endl;
            return 0;
          }
          fg = 2;
        }
      }
    }
    if (fg == 2 && q.size() == 1)
      cout << "Yes" << endl;
    else if (fg == 0 && q.empty())
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
