#include <bits/stdc++.h>
using namespace std;
const long long mod = (long long)1e9 + 7;
const long long mod2 = mod * 2;
int n;
long long x[500005], y[500005];
long long cross(int rt, int a, int b) {
  return (x[a] - x[rt]) * (y[b] - y[rt]) - (x[b] - x[rt]) * (y[a] - y[rt]);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld %lld", &x[i], &y[i]);
  long long polygon_area = 0;
  for (int i = 0; i < n; i++) polygon_area -= cross(n, i, (i + 1) % n);
  long long bigest_polygon = 0, sum_small_polygon = 0,
            sumx = (mod2 + x[0] + x[1]) % mod,
            sumy = (mod2 + y[0] + y[1]) % mod, ans = 0;
  int pivot = 1;
  for (int i = 0; i < n; i++) {
    while (bigest_polygon - cross(i, pivot, (pivot + 1) % n) <=
           polygon_area / 2) {
      bigest_polygon -= cross(i, pivot, (pivot + 1) % n);
      pivot = (pivot + 1) % n;
      sumx = (sumx + x[pivot]) % mod;
      sumy = (sumy + y[pivot]) % mod;
      sum_small_polygon = (sum_small_polygon + bigest_polygon) % mod;
    }
    ans = (ans + polygon_area % mod * ((pivot - i - 1 + n) % n) % mod -
           sum_small_polygon * 2 + mod2) %
          mod;
    long long cnt_cross =
        1ll *
        (x[i] * y[(i + 1) % n] % mod - x[(i + 1) % n] * y[i] % mod + mod2) *
        ((pivot - i - 1 + n) % n) % mod;
    long long of_sumy = (mod2 + x[i] - x[(i + 1) % n]) % mod *
                        (mod2 + sumy - y[i] - y[(i + 1) % n]) % mod;
    long long of_sumx = (mod2 + y[(i + 1) % n] - y[i]) % mod *
                        (mod2 + sumx - x[i] - x[(i + 1) % n]) % mod;
    sum_small_polygon =
        (sum_small_polygon + (cnt_cross - of_sumy - of_sumx) + mod2) % mod;
    sumx = (sumx - x[i] + mod) % mod;
    sumy = (sumy - y[i] + mod) % mod;
    bigest_polygon = bigest_polygon + cross(pivot, i, (i + 1) % n);
  }
  printf("%lld", ans);
}
