Text this: Suppressing epidemic spreading by optimizing the allocation of resources between prevention and treatment.