Given a prime $p > 2$ and positive integers $x,y \le \frac{p − 1}{2}$, prove that if $x(p − x)y(p − y)$ is a perfect square, then $x = y$.
This question was previously asked without context , and so was closed, but I did start towards a solution.
The primary insight is that the result depends on the unique representation of a prime as a sum of squares.
Obviously if that were not true we could have $m_0^2+n_0^2=m_1^2+n_1^2=p$. Then we could choose $x=m_0^2$ and $y=m_1^2$ as the lesser parts of those two different representations and with all contributing values being square, get a square that disproves the claim.
The other strand of proof that I did not succeed in completing was to eliminate the possibility that the various components might multiply together to give a square. Here are my thoughts on this so far:
Since $p$ prime, $x$ is coprime to $v:=(p-x)$ and $y$ is coprime to $w:=(p-y)$.
Find $g :=\gcd(x,y)$ and $h:=\gcd(v,w)$, and set $(a,b,c,d):=(x/g,y/g,v/h,w/h)$. If one of these terms is $1$ then all are, and $x=y$.
Assume that we have $a,b,c,d>1$. Then the expression of interest is $abcdg^2h^2$, which is square iff $abcd$ is square. The only possible common factors are in the pairs $(a,d)$ and $(b,c)$ so we would need $ad$ square and $bc$ square.
Can anyone either complete my proof or find a better way to demonstrate the truth of the opening claim?