Let $f:R\rightarrow S$ be a surjective homomorphism of commutative rings with unity. I want to prove that if $M$ is a maximal ideal then $f(M)$ is either $S$ or it is a maximal ideal of $S$. I get the feeling I should somehow use the correspondence theorem, but I just can't see how to exactly use it. Thank you in advance.
I also was wondering if the same statement holds for prime ideals?