const main = (inputs) => {

  const word = inputs[0];
  var count = 0;
  if (word.indexOf('A') !== -1) {
    count = count + 1;
  }
  if (word.indexOf('B') !== -1) {
    count = count + 1;
  }
  if (count >= 2) {
    console.log('Yes');
  } else {
    console.log('No');
  }
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));