main = do
  str <- getLine
  let strs = foldr (\x acc -> (++) <$> x <*> acc) [""] [["A", ""], ["KIH"], ["A", ""], ["B"], ["A", ""], ["R"], ["A", ""]]
      can = str `elem` strs
  putStrLn $ if can then "YES" else "NO"
