main=do
 s<-getLine
 putStrLn$if f s 0 then"YES"else"NO"
f[]i=i>=8
f s@(c:d) i
 |i==0=if c=='A' then f d(i+1)else f s(i+1)
 |i==1=if c=='K' then f d(i+1)else False
 |i==2=if c=='I' then f d(i+1)else False
 |i==3=if c=='H' then f d(i+1)else False
 |i==4=if c=='A' then f d(i+1)else f s(i+1)
 |i==5=if c=='B' then f d(i+1)else False
 |i==6=if c=='A' then f d(i+1)else f s(i+1)
 |i==7=if c=='R' then f d(i+1)else False
 |i==8=if c=='A' then f d(i+1)else f s(i+1)
 |i==9=False