I am looking for an illuminating example of a UFD that is not a PID. The standard one is $\mathbb{Z}[x]$, but since I am studying algebraic number theory, I am wondering if there is any subring of $\overline{\mathbb{Q}}$ (field of algebraic numbers) that is a UFD but not a PID.
I know that algebraic number rings are Dedekind domains and for those PID and UFD are equivalent, so naturally the example can not be a number ring. My first guess would therefore be $\mathbb{Z}[\sqrt{ m}]$ for $m \equiv 1$ $(\mod 4)$. But are any of those even UFDs?