function Main( input ){

	var strs = [ 'K', 'I', 'H', 'B', 'R' ],
			withoutA = input.split( 'A' ).join( '' ).split( '' );
	if( JSON.stringify( strs ) == JSON.stringify( withoutA ) )
		console.log( 'YES' );
	else
		console.log( 'NO' );

}

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