#include <stdio.h>
#include <stdlib.h>
int X[100000];
int Y[100000];
long long find_dist(int x1, int y1, int x2, int y2)
{
    long long a, b ,c;
    a = abs(x1 - x2);
    b = abs(y1 - y2);
    c = a + b;
    return c;
}
int main()
{
    int n;
    long long sum = 0;
    scanf("%d", &n);
    for(int i = 0;i < n;i++)
    {
        scanf("%d", &X[i]);
        scanf("%d", &Y[i]);
    }
    for(int i = 0;i < n;i++)
    {
        for(int k = i + 1;k < n;k++)
        {
            sum += find_dist(X[i], Y[i], X[k], Y[k]);
        }
    }
    printf("%lld\n", sum);
    return 0;
}

