#include<iostream>
#define endl '\n'
using namespace std;
long long n,x,y,x1,y1,rez=0;
long long ab(long long a)
{
    if(a<0) return -a;
    return a;
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin>>n;

    cin>>x1>>y1;

    long long t1,t2;

    for(int i=1;i<n;i++)
    {
        cin>>x>>y;

        t1=ab(x-x1);
        t1*=t1;

        t2=ab(y-y1);
        t2*=t2;

        rez+=(t1+t2);
    }
    cout<<rez*n/2<<endl;
}

