function Main(input) {
    var N = input[0].split('');
    var A = 0;
    var B = 0;

    for (var i = 0; i < N.length; i++) {
        if (N[i] === 'A') {
            A++;
        }
        if (N[i] === 'B') {
            B++;
        }
    }

    console.log(A !== 0 && B !== 0 ? 'Yes' : 'No');
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));