Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

E. Points

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou 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

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Sep/24/2020 08:06:10 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|