import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    var s = sc.next()
    val a_regex = Regex("A")
    val b_regex = Regex("B")
    val result1 = a_regex.containsMatchIn(s)
    val result2 = b_regex.containsMatchIn(s)

    if (result1 && result2) {
        println("Yes")
    } else {
        println("No")
    }
}