"use strict";
function main(input) {
  let s = input[0];

  if((s.indexOf("A")===-1) || (s.indexOf("B")===-1)){
    console.log("No");
  }else{
    console.log("Yes");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));