#include <bits/stdc++.h>
using namespace std;
string akiba(string s) {
  vector<string> can = {"KIHBR",    "KIHBRA",   "KIHBAR",   "KIHBARA",
                        "KIHABR",   "KIHABRA",  "KIHABARA", "AKIHBR",
                        "AKIHBRA",  "AKIHBAR",  "AKIHABR",  "AKIHABRA",
                        "AKIHABAR", "AKIHABARA"};
  auto it = find(can.begin(), can.end(), s);
  if (it != can.end())
    return "YES";
  else
    return "NO";
}
string akiba2(string s) {
  string s2(s);
  s2 = string(s2.begin(), remove(s2.begin(), s2.end(), 'A'));
  if (s2 != "KIHBR") return "NO";
  if (s.find("KIH") == string::npos) return "NO";
  int n = s.length();
  for (int i = 0; i < (int)(n - 1); i++)
    if (s[i] == s[i + 1]) return "NO";
  return "YES";
}
int main() {
  string s;
  cin >> s;
  cout << akiba2(s) << endl;
  return 0;
}
