#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  cout << ( s=="AKIHABARA" or s=="AKIHABAR" or s=="AKIHABRA" or s=="AKIHBARA" or s=="KIHABARA" or s=="AKIHABR" or s=="AKIHBAR" or s=="KIHABAR" or s=="AKIHBRA" or s=="KIHABRA" or s=="KIHBARA" or s=="AKIHBR" or s=="KIHABR" or s=="KIHBAR" or s=="KIHBRA" or s=="KIHBR" ?"YES" :"NO") << "\n";

}