#include<stdio.h>
#include<stdlib.h>
#include<math.h>

struct point{
    int x;
    int y;
}point;

int count_sum(int *array_x, int *array_y, int index, int N){
    int sum=0;

    for(int counter=1; counter<N-index; counter++){
        int number_x = (abs(array_x[index])+abs(array_x[index+counter]));
        int number_y = (abs(array_y[index])+abs(array_y[index+counter]));

        if(array_x[index]==array_x[index+counter]){
            sum += number_y*number_y;
        }else if(array_y[index]==array_y[index+counter]){
            sum += number_x*number_x;
        }else{
            sum += number_x*number_x + number_y*number_y;
        }
    }

    return sum;
}

int main(){
    int N;
    scanf("%d", &N);

    int array_x[N];
    int array_y[N];

    int sum=0;

    for(int i=0; i<N; i++){
        scanf("%d", &point.x);
        scanf("%d", &point.y);

        array_x[i]=point.x;
        array_y[i]=point.y;
    }

    for(int i=0; i<N; i++){
        sum += count_sum(array_x, array_y, i, N);
    }

    printf("%d", sum);

    return 0;
}
