Prevention versus treatment: A game-theoretic approach