object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq
  val ls = in(0).toArray.map(_.toInt)
  val sum = ls.count(_ == 'A')
  val ret = if(sum == 0 || sum == 3) "No" else "Yes"
  println(ret)
}

