#include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
using namespace std;
int main() {
  string S;
  cin >> S;
  bool flg_A = false, flg_B = false;
  for (auto s : S) {
    if (s == 'A')
      flg_A = true;
    else if (s == 'B')
      flg_B = true;
  }
  if (flg_A and flg_B)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
