Distinct integer solutions to $a^2+b^2=c^2+d^2$ I'm trying to find integer solutions to
$$a^2+b^2=c^2+d^2$$
with values  $a> c > d > b>0$
Or in other words, two triangles with integer legs and equal hypotenuse lengths, not necessarily integer. Seems like a Diophantine equation to me, but I only learned how to solve Diophantine equations in the form of Pell's equations. I couldn't find anything on this equation when I checked Wikipedia. It is similar to a Pythagorean quadruple, although not quite, so that's not helpful either. How do I find integer solutions to this?

Strong Hint:
$$\begin{align} a^2 + b^2 &= c^2 + d^2 \\ \implies a^2 + b^2 - c^2 &= d^2 \\ \implies a^2 + (b + c)(b - c) &= d^2 \\ \implies (b + c)(b - c) &= d^2 - a^2 \\ \implies (b + c)(b - c) &= (d + a)(d - a) \end{align}$$.
$$\therefore a^2 + b^2 \neq \{p : p = \text{prime number}\} \iff a^2 + b^2 = c^2 + d^2$$
Now what separates a prime number from any other (composite) number?

Solution to finding distinct integer solutions:
$$a^2 + b^2 = c^2 + d^2 = \{n \iff d(n) \geq 4 : d(n) = \text{number of divisors of $n$}, \ \forall n\in \mathbb{R}\}$$
