Determining whether a subring with a certain property is a UFD

98 Views Asked by At

I am trying to solve the following problem, but I have no idea of how to attack it. Thanks for any suggestion on how to prove it. The problem is:

Suppose that $R$ is a Unique Factorization Domain (UFD) and $S$ is a subring of $R$ containing $1$ with the following property: if $a,b \in R$ are nonzero and $ab \in S$, then $a,b \in S$. Show that $S$ is also a UFD.

I know the definition of UFD, but I don't know how to use the properties of the ring $S$ and $R$. Thanks for any suggestion!