#P76E. Points

    ID: 2102 Type: RemoteJudge 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>implementationmath*1700

Points

No submission language available for this problem.

Description

You are given N points on a plane. Write a program which will find the sum of squares of distances between all pairs of points.

The first line of input contains one integer number N (1 ≤ N ≤ 100 000) — the number of points. Each of the following N lines contain two integer numbers X and Y ( - 10 000 ≤ X, Y ≤ 10 000) — the coordinates of points. Two or more points may coincide.

The only line of output should contain the required sum of squares of distances between all pairs of points.

Input

The first line of input contains one integer number N (1 ≤ N ≤ 100 000) — the number of points. Each of the following N lines contain two integer numbers X and Y ( - 10 000 ≤ X, Y ≤ 10 000) — the coordinates of points. Two or more points may coincide.

Output

The only line of output should contain the required sum of squares of distances between all pairs of points.

Samples

4
1 1
-1 -1
1 -1
-1 1

32