#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  int R, B, n;
  R = 0;
  B = 0;
  cin >> n >> S;
  for (int i = 0; i < n; i++) {
    if (S[i] == R)
      R++;
    else
      B++;
  }
  if (R > B)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
