func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1000005;   const int mod = 1e9 + 7;   struct point {     int x, y;     inline friend long long operator*(point a, point b) {       return 1ll * a.x * b.y - 1ll * a.y * b.x;     }   } p[N];   long long sx[N], sy[N], s[N], ans, sum, area;   int n;   inline long long getS(int l, int r) { return s[r] - s[l] + (p[r] * p[l]); }   inline int chk(int l, int r) {     long long L = getS(l, r), R = getS(r, l + n);     if (L < R) return 1;     if (L == R && r <= n) return 1;     return 0;   }   inline long long cro(int k, int l, int r) {     long long xy = (sx[r] - sx[l - 1]) * p[k].y;     long long yx = (sy[r] - sy[l - 1]) * p[k].x;     return (xy % mod - yx % mod + mod) % mod;   }   int main() {     scanf( %d , &n);     for (int i = (1); i <= (n); i++) scanf( %d%d , &p[i].x, &p[i].y);     for (int i = (1); i <= (n / 2); i++) swap(p[i], p[n + 1 - i]);     for (int i = (1); i <= (n); i++) p[i + n] = p[i];     p[0] = p[n];     for (int i = (0); i < (n); i++) area = (area + (p[i] * p[i + 1])) % mod;     sx[0] = p[0].x, sy[0] = p[0].y;     for (int i = (1); i <= (2 * n); i++) {       sx[i] = (sx[i - 1] + p[i].x) % mod;       sy[i] = (sy[i - 1] + p[i].y) % mod;       s[i] = s[i - 1] + (p[i - 1] * p[i]);     }     int r = 0;     for (int l = (1); l <= (n); l++) {       if (r <= l + 1) sum = 0, r = l + 1;       while (chk(l, r + 1)) sum = (sum + s[++r] - s[l] + mod) % mod;       ans = (ans + sum + cro(l, l + 2, r)) % mod;       sum = (sum - (p[l] * p[l + 1]) % mod * (r - l - 1) % mod -              (p[l + 1] * p[l + 2]) % mod + 2ll * mod) %             mod;     }     ans = (1ll * n * (n - 3) / 2) % mod * area - 2 * ans;     ans = (ans % mod + mod) % mod;     cout << ans << endl;     return 0;   }   