#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
template <typename T>
void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
void chkmin(T &x, T y) {
  x = min(x, y);
}
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
template <typename T>
void write(T x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
void writeln(T x) {
  write(x);
  puts("");
}
char s[MAXN];
int main() {
  int n, pos = 0;
  read(n);
  scanf("\n%s", s + 1);
  for (int i = 1; i <= n; i++)
    if (s[i] == '(') pos = i;
  if (pos != 0) {
    for (int i = pos; i >= 2; i--) s[i] = s[i - 1];
    s[1] = '(';
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (s[i] == '(')
      cnt++;
    else
      cnt--;
    if (cnt < 0) {
      puts("No");
      return 0;
    }
  }
  if (cnt == 0)
    puts("Yes");
  else
    puts("No");
  return 0;
}
