#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<utility>
#include<cmath>
#include<string>
#include<cstring>
#include<map>
#include<queue>
#include<set>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define prin(arg) std::cout<<arg<<"\n"
#define prin2(arg1,arg2) std::cout<<arg1<<" "<<arg2<<"\n"
#define fill(arg,n) std::memset(arg,n,sizeof(arg))
#define mp std::make_pair
#define pb push_back
using std::cin;
typedef long long ll;
typedef std::pair<int,int> pi;
typedef std::vector<int> vi;
typedef std::set<int> si;
typedef std::string str;
const int INF=1e+9;
const ll INFLL=1e+17;
const ll MOD=1e+9+7;
str S;
int main(){
  cin>>S;
  int ss=S.size();
  bool f=false;
  //AKIHABARA,1111
  if(ss==9)
    rep(i,ss-8){
      if(S[i]=='A'&&S[i+1]=='K'&&S[i+2]=='I'&&S[i+3]=='H'&&S[i+4]=='A'&&S[i+5]=='B'&&S[i+6]=='A'&&S[i+7]=='R'&&S[i+8]=='A') f=true;
    }
  //AKIHABAR,1110
  if(ss==8){
    rep(i,ss-7){
      if(S[i]=='A'&&S[i+1]=='K'&&S[i+2]=='I'&&S[i+3]=='H'&&S[i+4]=='A'&&S[i+5]=='B'&&S[i+6]=='A'&&S[i+7]=='R') f=true;
    }
    //AKIHABRA,1101
    rep(i,ss-7){
      if(S[i]=='A'&&S[i+1]=='K'&&S[i+2]=='I'&&S[i+3]=='H'&&S[i+4]=='A'&&S[i+5]=='B'&&S[i+6]=='R'&&S[i+7]=='A') f=true;
    }
    //AKIHBARA,1011
    rep(i,ss-7){
      if(S[i]=='A'&&S[i+1]=='K'&&S[i+2]=='I'&&S[i+3]=='H'&&S[i+4]=='B'&&S[i+5]=='A'&&S[i+6]=='R'&&S[i+7]=='A') f=true;
    }
    //KIHABARA,0111
    rep(i,ss-7){
      if(S[i]=='K'&&S[i+1]=='I'&&S[i+2]=='H'&&S[i+3]=='A'&&S[i+4]=='B'&&S[i+5]=='A'&&S[i+6]=='R'&&S[i+7]=='A') f=true;
    }
  }
  if(ss==7){
    //KIHABAR,0110
    rep(i,ss-6){
      if(S[i]=='K'&&S[i+1]=='I'&&S[i+2]=='H'&&S[i+3]=='A'&&S[i+4]=='B'&&S[i+5]=='A'&&S[i+6]=='R') f=true;
    }
    //KIHABRA,0101
    rep(i,ss-6){
      if(S[i]=='K'&&S[i+1]=='I'&&S[i+2]=='H'&&S[i+3]=='A'&&S[i+4]=='B'&&S[i+5]=='R'&&S[i+6]=='A') f=true;
    }
    //KIHBARA,0011
    rep(i,ss-6){
      if(S[i]=='K'&&S[i+1]=='I'&&S[i+2]=='H'&&S[i+3]=='B'&&S[i+4]=='A'&&S[i+5]=='R'&&S[i+6]=='A') f=true;
    }              
    //AKIHBRA,1001
    rep(i,ss-6){
      if(S[i]=='A'&&S[i+1]=='K'&&S[i+2]=='I'&&S[i+3]=='H'&&S[i+4]=='B'&&S[i+5]=='R'&&S[i+6]=='A') f=true;
    }
    //AKIHBAR,1010
    rep(i,ss-6){
      if(S[i]=='A'&&S[i+1]=='K'&&S[i+2]=='I'&&S[i+3]=='H'&&S[i+4]=='B'&&S[i+5]=='A'&&S[i+6]=='R') f=true;
    }                
  //AKIHABR,1100
    rep(i,ss-6){
      if(S[i]=='A'&&S[i+1]=='K'&&S[i+2]=='I'&&S[i+3]=='H'&&S[i+4]=='A'&&S[i+5]=='B'&&S[i+6]=='R') f=true;
    }
  }
  if(ss==6){
    //AKIHBR,1000
    rep(i,ss-5){
      if(S[i]=='A'&&S[i+1]=='K'&&S[i+2]=='I'&&S[i+3]=='H'&&S[i+4]=='B'&&S[i+5]=='R') f=true;
    }
    //KIHABR,0100
    rep(i,ss-5){
      if(S[i]=='K'&&S[i+1]=='I'&&S[i+2]=='H'&&S[i+3]=='A'&&S[i+4]=='B'&&S[i+5]=='R') f=true;
    }
    //KIHBAR,0010
    rep(i,ss-5){
      if(S[i]=='K'&&S[i+1]=='I'&&S[i+2]=='H'&&S[i+3]=='B'&&S[i+4]=='A'&&S[i+5]=='R') f=true;
    }
    //KIHBRA,0001
    rep(i,ss-5){
      if(S[i]=='K'&&S[i+1]=='I'&&S[i+2]=='H'&&S[i+3]=='B'&&S[i+4]=='R'&&S[i+5]=='A') f=true;
    }
  }
  if(ss==5){
    //KIHBR,0000
    rep(i,ss-4){
      if(S[i]=='K'&&S[i+1]=='I'&&S[i+2]=='H'&&S[i+3]=='B'&&S[i+4]=='R') f=true;
    }
  }
  if(f) prin("YES");
  else prin("NO");
  return 0;
}


Measured memory_bytes: 256