Prosecutors charged two men trying to hurt officers