Points
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
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.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 24%