I'm trying to prove the following result:
Let $R$ be a principal ideal domain, $S$ an integral domain and $f: R\to S$ a surjective morphism. Prove that if $f$ is not an isomorphism, then $S$ is a field.
I have done the following: if $f$ is surjective, then $Im f=S$ and by the first theorem of isomorphism I know that $R/\ker f$ is isomorphic to $S$. So, $S$ is a field if and only if $R/\ker f$ is a field. Then I noticed that $\ker f$ is an ideal of $R$ and since $R$ is a principle ideal domain, there exists $a\in R$ such that $\ker f = <a>$. Besides, $a\neq 0$, because we assume that $f$ is not an isomorphism; since $f$ is surjective, it can't be injective and its kernel is not trivial.
I don't know how to proceed, now. I've tried to prove that $\ker f$ is maximal, and this would finish the proof, but I couldn't do it.