Let $N:\mathbb{Z}{[i]} \rightarrow \mathbb{Z}$ be defined as $N(a+bi)= a^2+b^2$. Prove if $z \in \mathbb{Z}{[i]}$ such that $N(z)$ is a prime number then $z$ is irreducible.
I understand that by definition of function $N$ that the result of $N(z)= \text{prime}$. I also know that due to ring structure primes and irreducibility are related but not the same thing. How do I formally show that $z=ab$ for $a,b \in \mathbb{Z}{[i]}$ implies that either $a$ or $b$ is a unit?