Competition Diophantine Equation I am looking for the number of integer solutions to this system of equations 
$$a^2+b^2+c^2+d^2=2500$$ and 
$$(a+50)(b+50)=cd$$ 
I tried moving terms around in the first equation and using the difference of two squares to try and gain some information, but came up empty. I was wondering what the best way to attack this problem is. Should I take the equations mod something, or should I try and place some bounds on the variables and try to derive the number of solutions from that? I ask that y'all only give me hints. Thanks

It is well known that by setting
$$ r_4(n) = \left|\{(a,b,c,d)\in\mathbb{Z}^4: a^2+b^2+c^2+d^2=n\}\right| $$
we have
$$ r_4(n) = 8\sum_{\substack{d\mid n\\ 4\nmid d}}d $$
for instance through Jacobi's triple product. In particular the number of ways for writing $n$ as a sum of four squares is a constant multiple of a multiplicative function, which only depends on the factorization of $n$. Since $2500 = 2^2\cdot 5^4$ we have
$$\begin{eqnarray*} r_4(2500) &=& 8\left(1+5+5^2+5^3+5^4+2+2\cdot 5+2\cdot 5^2+2\cdot 5^3+2\cdot 5^4\right)\\&=&8\cdot 3\cdot\frac{5^5-1}{5-1}=6\cdot(5^5-1)=\color{red}{18744}.\end{eqnarray*} $$
In the given problem we have an extra constraint, and it is a heavy one, since it leads to
$$ 2500 = a^2+b^2+c^2+d^2 = cd-ab-50(a+b),$$
$$ (a^2+ab+b^2)+50(a+b)+(c^2-cd+d^2) = 0, $$
and by setting $a=\frac{A-50}{3},b=\frac{B-50}{3}$ we get
$$ (A^2+AB+B^2)+9(c^2-cd+d^2) = 7500,\quad A\equiv B\equiv 2\pmod{3}$$
which clearly has a finite number of solutions, since both $x^2\pm xy+y^2$ and $x^2+9y^2$ are positive definite quadratic forms. The integers represented by $x^2\pm xy+y^2$ are the ones given by a product of primes of the form $3k+1$ and squares of primes of the form $3k+2$. For a brute-force approach, one may simply list all the solutions of the above equation, then check which ones meet $a^2+b^2+c^2+d^2=2500$.
