I'm looking for an elementary proof of the statement in the title.
Actually I have already proved that if $-\bar{1}$ is a square then $p\equiv 1 \pmod 4$ or $p=2$.
I try to deduce from this statement that if $p=4m+3$ is a prime factor of $n$ then $p$ can only have an even exponent.
I know that I can prove it using Gaussian integers, but I'm really trying to do it using only the previous result.
Let $q$ be a prime such that $q|n$ and q doesnot divides $y$ and $x$. If it divides both $x$ and $y$ then exponent of the prime would be even in $n$ which follows else, let $v_{q}(n)=a\geq 1$ then by Euler generalization of FLT portray it by Euler totient function as $x^2+y^2\equiv 0 (\mod q^{a})$ Let $z$ be the multiplicative inverse of $y$ modulo $q^{a}$.Note that if $q$ doesnot divides $y$ this exist as $gcd(y,q^a)=1$ implies there exist c and d such that $yc+q^{a}d=1$ plugging $c=z$ we have $yz\equiv 1(\mod q^{a})$ thus $(xz)^{2}\equiv -1(\mod q^{a})$ then $ord_{q^{a}}(xz)=4$ thus $4|q^{a-1}(q-1)$ by phi function deduction. But $q-1$ is $2$ mod $4$ if $a=1$ then $4|q-1$ then contradiction. Thus any prime dividing $n$ must be of form $4k+1$ for some $k$ in integers positive if $q$ doesnot divides both $x$ and $y$ so only possibility a prime $q$ of form $4k+3$ dividing $n$ is if it's divide both $x$ and $y$ then obviously $q^{2}|n$ Example: $3^{2}|3^{2}+6^{2}$