76_E. Points
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.

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.

Examples

Input

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


Output

32
```python
import math

if __name__== '__main__':
    n = int(input())
    n_1= n- 1
    totalDistance= 0
    Xs= []
    Ys= []
    xs= []
    ys= []
    xAddition= 0
    yAddition= 0

    for _ in range(n):
        x, y= [int(x) for x in input().split()]
        Xs.append(n_1* x* x)
        Ys.append(n_1* y* y)
        xs.append(x)
        ys.append(y)
        xAddition+= x
        yAddition+= y

    for index in range(n):
        xAddition-= xs[index]
        subtract= 2* xs[index]* xAddition
        totalDistance+= Xs[index]- subtract

        yAddition-= ys[index]
        subtract= 2* ys[index]* yAddition
        totalDistance+= Ys[index]- subtract
    print(totalDistance)
    
        
    


```