main :: IO ()
main = do
    s <- getLine
    putStrLn $ if solve s then "YES" else "NO"

solve :: String -> Bool
solve "AKIHABARA" = True
solve s | length s > 9 = False
        | otherwise    = or $ map solve $ insertA s
    
bisects :: String -> [(String, String)]
bisects xs = [ splitAt i xs | i <- [0 .. length xs] ]

insertA :: String -> [String]
insertA s = map (\(x, y) -> x ++ "A" ++ y) $ bisects s