#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <vector>
#include <cmath>

using namespace std;

struct point {
    int x;
    int y;
};

struct point* init(int x, int y){
    struct point* p = (struct point*)malloc(sizeof(struct point));
    p->x = x;
    p->y = y;
    return p;
}

int main(){
    int n;
    cin >> n;
    vector<struct point*> arr;

    for(int i = 0; i < n; i++){
        int x, y;
        cin >> x >> y;
        arr.push_back(init(x, y));
    }

    /*printf("\n");
    for(int i = 0; i < arr.size(); i++){
        printf("%d %d\n", arr[i]->x, arr[i]->y);
    }*/



    int sum = 0;
    for(int i = 0; i < arr.size()-1; i++){
        for(int j = i + 1; j < arr.size(); j++){
            int way = (pow((arr[j]->x - arr[i]->x), 2) + pow((arr[j]->y + arr[i]->y), 2));
            sum += way;
            printf("Current sum: %d\n", sum);
            printf("Current way(%d;%d <-> %d;%d): %d\n___\n", arr[i]->x, arr[i]->y, arr[j]->x, arr[j]->y, way);
        }
    }

    cout << "Final sum: " << sum << endl;

    printf("Here");
}
