Problems
Points
Points
There are n points on the plane. Find the sum of squares of distances between all pairs of points.
Input
The first line contains number of points n (1 ≤ n ≤ 100 000). Each of the next n lines contains two numbers x and y (‑10 000 ≤ x, y ≤ 10 000) – the points coordinates.
Output
Print one integer - the sum of squares of distances between all pairs of points.
Input example #1
4 1 1 -1 -1 1 -1 -1 1
Output example #1
32