You can write formulas in LaTeX or in plain text, and write your solution in any language.
Let n≥3 be an integer, and let a1,…,an be pairwise distinct real numbers. For each index i∈{1,…,n}, let si be the sum of all entries except ai, and let pi be their product:
si=j=i∑aj,pi=j=i∏aj,
where both expressions range over indices j∈{1,…,n}∖{i}.
Suppose the list s1,…,sn is a rearrangement of the list p1,…,pn: there is a permutation π of {1,…,n} such that si=pπ(i) for every i.