fun main(args: Array<String>) {
    val S = readInputLine()

    if (S.count { it == 'A' } == 3 || S.count { it == 'B'} == 3) {
        println("No")
    } else {
        println("Yes")
    }
}

fun readInputLine(): String {
    return readLine()!!
}
