#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x[n], y[n];
  long long a = 0, b = 0, c = 0, d = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    a += x;
    b += y;
    c += (x * x);
    d += (y * y);
  }
  long long ans = (n) * (c + d);
  ans -= (a * a);
  ans -= (b * b);
  cout << ans << endl;
  return 0;
}
