import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val candidates = for {
      bit <- 0 until (1 << 4)
    } yield {
      val a1 = if ((bit & (1 << 0)) != 0) {
        "A"
      } else {
        ""
      }
      val a2 = if ((bit & (1 << 1)) != 0) {
        "A"
      } else {
        ""
      }
      val a3 = if ((bit & (1 << 2)) != 0) {
        "A"
      } else {
        ""
      }
      val a4 = if ((bit & (1 << 3)) != 0) {
        "A"
      } else {
        ""
      }
      val s = a1 + "KIH" + a2 + "B" + a3 + "R" + a4
      s
    }

    val set = candidates.toSet


    val in = new Scanner(System.in)
    val S = in.next()
    if (set.contains(S)) {
      println("YES")
    } else {
      println("NO")
    }
  }
}
