i have some confusion in this answer
Why is $\mathbb{Z}[\sqrt{-n}], n\ge 3$ not a UFD?
My attempt : we know that $1$ is odd and $2$ is even . So if $n$ is even then $n=2$ , then obviously $2$ divides $\sqrt{-2}^2=-2$ but does not divide $\sqrt{-2}$, so $2$ is a nonprime irreducible
Again similarly take $n =1$ when $n$ is odd ,$2$ divides $(1+\sqrt{-1})(1-\sqrt{-1})=1+1=2$ without dividing either of the factors, so again $2$ is a nonprime irreducible.
But the user chris eagle said that it fail for $n= 1, 2$
why is fail for $n =1 , 2 $??