import io.StdIn._

object ABC158A extends App {
  private val stations = readLine.toCharArray
  val onlyA = stations.forall(c => c == 'A')
  val onlyB = stations.forall(c => c == 'B')

  println(if (onlyA || onlyB) "No" else "Yes")
}
