Let \(A_1, A_2, \ldots, A_n\) be distinct points in the plane. Suppose that each point \(A_i\) can be assigned a real number \(\lambda_i \neq 0\) in such a way that

\[

A_i A_j^2=\lambda_i+\lambda_j, \quad \text { for all } i, j \text { with } i \neq j .

\]

(a) Show that \(n \leq 4\).

(b) Prove that if \(n=4\), then \(\frac{1}{\lambda_1}+\frac{1}{\lambda_2}+\frac{1}{\lambda_3}+\frac{1}{\lambda_4}=0\).