Among the $100$ constants $a_1,a_2,a_3,...,a_{100}$, there are $39$ equal to $-1$ and $61$ equal to $+1$. Find the sum of all the products $a_ia_j$, where $1\le i < j \le 100$.

Let's think step by step and output the final answer within \boxed{}.
user