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

const string dest = "KIHBR";
int x = 1, p, q, n;
string src;
char ch;

int main() {
	while ((ch = getchar()) != '\n') {
		(ch ^ 65) ? (src += ch, n=0) : n++;
		x &= (!(p |= (ch == 'K')) || (q |= (ch == 'R')) || n < 2);
	}
	puts((x && (src == dest)) ? "YES" : "NO");
	while (1);
}