\begin{array}{l}(x_1^2+\cdots+x_n^2)a+(x_1+\cdots+x_n)b=x_1y_1+\cdots+x_ny_n,\\ (x_1+\cdots+x_n)a+nb=y_1+\cdots+y_n.\end{array}