function Main( input ){

	if( input.match( /KIH/ ) ){
		var strs = 'KIHBR', withoutA = input.split( 'A' ).join( '' );
		if( strs === withoutA ) console.log( 'YES' );
		else console.log( 'NO' );
	}
	else console.log( 'NO' );
	
}

Main( require( 'fs' ).readFileSync( '/dev/stdin', 'utf8' ) );