function main(input) {

    const reverse = (s) => {
        return s.split('').reverse().join('');
    }

    const S = reverse(input.split('\n')[0]);

    if (S === "BBB" || S === "AAA") console.log("No");
    else console.log("Yes");
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));