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

#define rep(_i,_j,_k) for(int _i = _j; _i<=_k;_i++)
set<string> st;
void init(){
	string s1 = "KIH", s2 = "B", s3 = "R",s4 = "A";
	rep(i,0,1)
		rep(j,0,1)
			rep(k,0,1)
				rep(l,0,1){
					string s_ok;
					if(i == 1)s_ok += s4;
					s_ok+=s1;
					if(j == 1)s_ok+=s4;
					s_ok+=s2;
					if(k == 1)s_ok+=s4;
					s_ok+=s3;
					if(l == 1)s_ok+=s4;
					st.insert(s_ok);
				}
	return;
		
}
string s;
int main(){
	init();
	cin>>s;
	if(st.count(s)!=0)puts("YES");
	else puts("NO");
	return 0;
}