main = do
  s <- getLine

  putStrLn $ if part s "AKIHABARA" && part "KIHBR" s then "YES" else "NO"

  where
    part [] _ = True
    part (x:_) [] = False
    part (x:xs) (y:ys)
      | x == y = part xs ys
      | x /= y = part (x:xs) ys