I would like to classify the sets of integers $a_{1},...,a_{n}$ that satisfy the following two equations. $$\sum_{k=0}^{n}a_{k}\equiv 0\mod 2$$ $$\sum_{i\neq j}a_{i}a_{j}=0$$ For example, if $n=3$, I believe all irreducible solutions (those that are not of the form $\{2a,2b,2c\}$ for another solution $\{a,b,c\}$) are of the form $\{x-y,x+y,\frac{1}{2}(z-x)\}$ for any choice of $x,y,z$ such that $x\equiv z\mod 4$ and $y^2=xz$. Another class of solutions are the sets $\{1,1,...,1,\frac{1}{2}(1-k)\}$ where there are $k$ 1's and $k\equiv 3\mod 4$. Are there general methods that can be applied? Are there any other nice classes of solutions?