func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, i;   long long s, ans;   int x[200000], y[200000];   long long a[200000], b[200000], c[200000], d[200000];   void count() {     s = 0;     for (i = 1; i <= n; i++) b[i] = c[i] = d[i] = 0;     for (i = 1; i < n; i++) a[i] = a[i + 1] - a[i];     for (i = 1; i < n; i++) {       b[i] = b[i - 1] + i * a[i];       c[i] = c[i - 1] + i * a[i] * a[i];     }     for (i = 2; i < n; i++) d[i] = d[i - 1] + 2 * a[i] * b[i - 1];     for (i = 1; i < n; i++) s += c[i] + d[i];   }   int main() {     scanf( %d , &n);     for (i = 1; i <= n; i++) scanf( %d%d , &x[i], &y[i]);     x[0] = y[0] = -200000000;     for (i = 0; i <= n; i++) a[i] = x[i];     sort(a, a + n + 1);     count();     ans += s;     for (i = 0; i <= n; i++) a[i] = y[i];     sort(a, a + n);     count();     ans += s;     cout << ans;     return 0;   }   