let s = read_line ()
let t = "AKIHABARA"
let rec f u i = if i >= String.length t then u = s
  else if t.[i] = 'A' then f (u ^ "A") (i + 1) || f u (i + 1) else f (u ^ String.make 1 t.[i]) (i + 1)
let _ = print_endline @@ if f "" 0 then "YES" else "NO"