Find all the Gaussian integers and such that and .
First, let and . Expanding and comparing real and imaginary parts, we have the following linear system of equations.
Evidently, . This yields the following equality.
Reducing mod 5 yields the following two equations: mod 5 and mod 5. A simple but tedious case analysis reveals that this system has two solutions: and .
Now recall the constraint that ; that is, . Thus must be one of , , , , , and . Thus we have .
Thus the solutions of our original equation are and .