// inputに入力データ全体が入る
function Main(input) {
    // 1行目がinput[0], 2行目がinput[1], …に入る
    if (input == 'BBB' || input == 'AAA') {
        console.log("No\n");
    } else if (input == 'AAB'){
        console.log("Yes");
    } else if (input == 'ABA') {
        console.log("Yes");
    } else if (input == 'ABB') {
        console.log("Yes");
    } else if (input == 'BAA') {
        console.log("Yes");
    } else if (input == 'BAB') {
        console.log("Yes");
    } else if (input == 'BBA') {
        console.log("Yes");
    }

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));