#include <bits/stdc++.h>
using namespace std;
int vx[] = {0, 0, -1, 1};
int vy[] = {1, -1, 0, 0};
int dx[] = {1, 0, -1, 1, -1, 1, 0, -1};
int dy[] = {1, 1, 1, 0, 0, -1, -1, -1};
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
const long long mod = 1e9 + 7;
const int INF = INT_MAX / 2;
const int N_MAX = 100010;
int main() {
  int n;
  string s;
  cin >> n;
  cin >> s;
  int a, b;
  for (int i = 0; i < int(s.length()); i++) {
    if (s[i] == 'A') {
      a++;
    } else if (s[i] == 'B') {
      b++;
    }
  }
  if (a > b) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
