A ring in which all prime ideals are maximal

Let R be a commutative ring with identity. Suppose that for every a∈R there is an integer n≥2 such that an=a. Show that every prime ideal of R is maximal.