#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n % 2 == 1)
    cout << "No" << endl;
  else if (s.size() == 0)
    cout << "Yes" << endl;
  else {
    stack<char> st;
    int b = 0, e = 0;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == '(') {
        st.push('(');
      } else if (s[i] == ')') {
        if (!st.empty()) {
          st.pop();
        } else
          b++;
        if (b > 1) {
          e = 1;
          break;
        }
      }
    }
    if (e == 1)
      cout << "No" << endl;
    else if (st.size() == 0)
      cout << "Yes" << endl;
    else if (st.size() == 1 && b == 1)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
