We're working on Gauss integers...
p is an odd prime such that $p \not\equiv 1 \pmod 4$. We want to prove that if there is $(a,b,c,d) \in \mathbb{Z}^4$ such that
$$p = (a+ib)(c+id) \text{ and }p^2 = a^2 + b^2$$
then $p\mid a$ and $p\mid b$.
I am not very familiar with divisibility relations, could you help me please ..
First, note that if the sum of two squares is odd, then is congruent to $1$ mod $4$.
$$p^2=p\bar p=(a+ib)(c+id)(a-ib)(c-id)=(a^2+b^2)(c^2+d^2)=p^2(c^2+d^2)$$
Then $c^2+d^2=1$. We have two possibilities:
In both cases $p$ is a divisor (rather trivial, though) of $a$ and $b$.