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

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