open Printf
open Scanf

let solve s =
  let ls = ["AKIHABARA";
            "KIHABARA"; "AKIHBARA"; "AKIHABRA"; "AKIHABAR";
            "KIHBARA"; "KIHABRA"; "KIHABAR"; "AKIHBRA"; "AKIHBAR"; "AKIHABR";
            "KIHBRA"; "KIHBAR"; "KIHABR"; "AKIHBR";
            "KIHBR"] in
  if List.mem s ls then "YES" else "NO"

let () =
  scanf "%s " solve |> printf "%s\n"
