This is exercise 14.2 N in Vakil, self-study. Similar questions have been asked a few times on this site, but none of the answers use a method that I believe Vakil intended: here, here, and here.
We are to show $\mathbb R[x, y]/(x^2 + y^2 -1)$ is not a UFD, but over $\mathbb C$, it is, using exercise 14.2 L, which says, among other things, that $\mathbb P^n - Y$ is not the spectrum of a UFD if $Y$ is a hypersurface of degree $d > 1$.
The issue is that I don't see how to write the unit circle as the complement of a degree $d > 1$ hypersurface in a projective space, if indeed that is what we are supposed to do, nor do I see how, supposing we have done this, the result will change over $\mathbb C$, since presumably 14.2 L still applies.