If m and n are sums of two squares and $n\mid m$ then so is $m/n$ Prove that if $m$ and $n\in\mathbb{N}$ are both the sums of two squares, and $n|m$, then $\frac{m}{n}$ is also the sum of squares.
I tried to consider prime divisors of m and n and distinct between $p\equiv 1  \pmod 4$ and $p\equiv3\pmod4$ but didn't get to any conclusion
 A: Consider this: a positive integer $n$ is a sum of squares (meaning: of two squares of natural numbers) if and only if in its prime-power factorization, primes congruent to $3$ modulo $4$ appear with an even exponent.

Proof
I assume the hard direction is from left to right. So let $p \equiv 3 \pmod{4}$ be a prime, and suppose $p \mid a^{2} + b^{2} = (a + i b) ( a - i b)$. Since $p$ is still a prime in the Gaussian integers, $p$ divides one of the factors. But if $p^{e}$ is the highest power of $p$ that divides $a + i b$, then conjugating we see that $p^{e}$ also divides $a - i b$. It follows that the highest power of $p$ that divides $a + i b$ and $a - i b$ is the same, say $p^{e}$, so the highest power of $p$ that divides $a^{2} + b^{2}$ is $p^{2 e}$.
A: Another proof: We know that in the prime factorization of a number which is a sum of two squares that $\prod p_i^k$ $k$ can only be odd if $p_i\equiv 1\pmod{4}$.
We prove by considering the contrapositive: Suppose that $n/m$ is not a sum of two squares. Then it has at least one prime factor $q$ with an odd exponent, but that means that either $n$ or $m$ would also have a prime factor $q$ with an odd exponent so either $n$ or $m$ cannot be a sum of two primes.
