#include<bits/stdc++.h>

using namespace std;

int main()
{
	string s1;
	cin >> s1;
	
	string s2 = "AKIHABARA";
	int idx = 0;
	int f = 1;
	
	if (s2.size() < s1.size()) f = 0;
	
	
	
	for (int i = 0; i < s1.size(); i++)
	{
		if (idx >= 9)
		{
			f = 0;
			break;
		}
		
		if (s1[i]!=s2[idx])
		{
			if (s2[idx] == 'A')
			{
				idx++;
			}
			else
			{
//				printf("%d %d %c %c\n",i,idx,s1[i],s2[idx]);
				f = 0;
				break;
			}
		}
		idx++;
	}
	
	if (f)
	{
		printf("YES\n");
	}
	else
	{
		printf("NO\n");
	}
	return 0;
}