Let $R$ be a unique factorization domain (UFD). Prove that if $R$ is such that every ideal generated by two elements is principal, then $R$ is a principal ideal domain (PID).

I'm having some trouble with this proof. Unfortunately I don't really have an idea for a starting place. It seems difficult to take a statement about specific ideals in $R$ and prove a statement about every ideal in $R$. Maybe something with GCD's will help?


Ideals are closed under gcd: $\,a,b\in I\,\Rightarrow\, I\supseteq (a,b) = (\gcd(a,b)).$ Thus an ideal $I\ne 0\,$ is generated by any $\,0\neq a\in I$ with least #prime factors (else $\,a\nmid b\in I\,\Rightarrow\, \gcd(a,b)\in I$ and, being a proper factor of $\,a,\,$ it has fewer prime factors than $\,a,\,$ contra choice of $a).$

Remark $\ $ The descent used above is a generalization of the Euclidean descent (by division algorithm) in the classical proof that Euclidean domains are PIDs. More generally we have the Dedekind-Hasse criterion: a domain $\rm\,D\,$ is a PID $\iff$ given $\rm\:0\neq a, b \in D,\:$ either $\rm\:a\:|\:b\:$ or some D-linear combination $\rm\:a\,d+b\,c\:$ is "smaller" than $\rm\,a\,$ (using $\,\Bbb N\,$ or any well-ordered set for "size")

It is clear that such a domain must be PID (since then a "smallest" element in an ideal must divide all others). Conversely, since a PID is UFD, an adequate "smaller" metric is the number of prime factors (if $\rm\,a\nmid b\:$ then their gcd $\rm\,c\,$ must have fewer prime factors; for if $\rm\:(a,b) = (c)\:$ then $\rm\,c\:|\:a\:$ properly, else $\rm\,a\:|\:c\:|\:b\:$ contra hypothesis), i.e. in a PID an ideal is generated by any minimal elt, i.e. one with fewest #prime factors (e.g. minimal polynomials in $K[x])$.

More generally it is easy to show a domain $D$ is a PID $\iff D$ is Bezout with ACCP (Ascending Chain Condition on Principal ideals, i.e. the divisibility relations is well-founded, i.e. there are no infinite descending divisibility chains $\,\ldots\, d_3\mid d_2\mid d_1$).