import scala.io.{StdIn => in}

object Main extends App {
  val ref = "KIHBR"
  val s = in.readLine
  val ans = if(!s.contains("AA") &&
    !s.contains("KA") &&
    !s.contains("IA") &&
    s.replace("A","") == ref) "YES" else "NO"
  println(ans)
}