Let $\pi$ be a prime element in $\Bbb{Z}[i]$. Then $N(\pi)=2$ or $N(\pi)=p$ s.t. $p$ is prime and $p\equiv 1\pmod 4$ 
Let $\pi$ denote a prime element in $\Bbb{Z}[i]$ such that $\pi\not\in \Bbb{Z},i\Bbb{Z}$. Prove that $N(\pi)=2$ or $N(\pi)=p$, where $p$ is a prime number $\equiv 1\pmod4$. Give a complete classification of the prime elements of $\Bbb{Z}[i]$ using the prime numbers in $\Bbb{Z}$.

This exact question has been asked here but I do not understand the answers given, so I will ask it again in hope of further explanation.
Here's everything I know that will probably help me with the problem:


*

*We know that $\pi=a+bi$ where $a,b\in \Bbb{Z}\setminus \{ 0\}$.

*Fermat's Two Square theorem: A prime number $p\equiv 1 \mod4$
satisfies $p=a^2+b^2$ where $a\neq b$ and $a,b\in \Bbb{N}\setminus
   \{0\}$.

*$\pi$ is irreducible in $\Bbb{Z}[i]$

*If $\pi=xy$ then $\pi \mid x$ or $\pi \mid y$

*If $N(\pi)=2$ then $a=\pm 1, b=\pm 1$.

*If $N(\pi)=p$ where prime $p\equiv 1\pmod 4$ then we know $p=a+bi$ for some $a,b\in \Bbb{Z}\setminus \{0\}$ by Fermat's theorem.


I can't figure out where to start. I was thinking of starting with this:
Let $x,y\in \Bbb{Z}[i]$ such that $x=x_1+x_2 i$ and $y=y_1+y_2i$. Then $\pi\mid x$ or $\pi\mid y$. Suppose $\pi\mid x$..... 
Can I have a hint on how to begin this?

It's easy to see that $1+i$ and $1-i$ are irreducible in $\mathbb{Z}[i]$ and the only elements $x\in\mathbb{Z}[i]$ such that $N(x)$ are those two, up to multiplication by invertible elements (that is, $1$, $-1$, $i$ and $-i$). In particular $2$ is not irreducible in $\mathbb{Z}$.
Suppose $p>2$ is a prime integer such that $p\equiv 1\pmod{4}$. By Fermat's two-square theorem, $p=a^2+b^2$ for some integers $a,b$. Then $a+bi$ and $a-bi$ are not associates in $\mathbb{Z}[i]$ and they are irreducible.
Indeed, suppose $a+bi=xy$ for some $x,y\in \mathbb{Z}[i]$. Then
$$
N(x)N(y)=N(a+bi)=a^2+b^2=p
$$
and so either $N(x)=1$ or $N(y)=1$, which is equivalent to the fact that either $x$ or $y$ is invertible.
The same holds of course for $a-bi$.
Note that if $z\in\mathbb{Z}[i]$ is irreducible, then $\bar{z}$ is irreducible as well, because conjugation is an automorphism of $\mathbb{Z}[i]$.
Now we do the converse.
Suppose $z\in\mathbb{Z}[i]$ is irreducible. Let $p\mid N(z)=z\bar{z}$, where $p$ is a prime integer. If $p$ is irreducible also in $\mathbb{Z}[i]$, then $p\mid z$ or $p\mid\bar{z}$, but this is the same because $p\in\mathbb{Z}$. Since $z$ is irreducible, then $z=pu$, for some invertible $u$.
If $p$ is not irreducible in $\mathbb{Z}[i]$, then $p=xy$, where neither $x$ nor $y$ is invertible. and so $p^2=N(p)=N(x)N(y)$ forces $N(x)=N(y)=p$. Therefore both $x$ and $y$ are irreducible, as seen before. Since $x\mid N(z)=z\bar{z}=N(z)$, it's not restrictive to assume that $x\mid z$. Therefore $x=zu$ for some invertible $u$, so $\bar{x}=\bar{z}\bar{u}$ and $x\bar{x}=z\bar{z}$. Similarly, $y\bar{y}=z\bar{z}$, so
$$
p^2=N(p)=N(x)N(y)=x\bar{x}y\bar{y}
$$
and it follows that $z\bar{z}=p$. Thus $N(z)$ is a sum of two squares in $\mathbb{Z}$, so either $N(z)=2$ or $N(z)\equiv1\pmod{4}$.
A prime integer $p$ such that $p\equiv 3\pmod{4}$ is irreducible in $\mathbb{Z}[i]$. Indeed, if $p=xy$, then $p^2=N(x)N(y)$ with $N(x)>1$ and $N(y)>1$, which forces $N(x)=p$. But then $p$ would be the sum of two squares in $\mathbb{Z}$, which is impossible.
In conclusion, the prime elements in $\mathbb{Z}[i]$ are


*

*$a+bi$ and $a-bi$ where $a^2+b^2$ is a prime integer (so $a^2+b^2=2$ or $a^2+b^2\equiv 1\pmod{4}$)

*$p$, where $p$ is a prime integer with $p\equiv 3\pmod{4}$
and all associates thereof.
