#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long MO(long long x) {
  if (x >= 0) return x % MOD;
  x = -x;
  if (x % MOD == 0) return 0;
  return MOD - x % MOD;
}
long long add(long long x, long long y) {
  return x + y >= MOD ? x + y - MOD : x + y;
}
long long sub(long long x, long long y) { return x >= y ? x - y : x + MOD - y; }
struct pnt {
  long long x, y;
  pnt(long long xx = 0, long long yy = 0) : x(xx), y(yy) {}
} P[2000000];
long long operator^(pnt A, pnt B) { return A.y * B.x - A.x * B.y; }
pnt add(pnt A, pnt B) { return pnt(add(A.x, B.x), add(A.y, B.y)); }
pnt sub(pnt A, pnt B) { return pnt(sub(A.x, B.x), sub(A.y, B.y)); }
long long pro(pnt A, pnt B) { return sub(A.y * B.x % MOD, A.x * B.y % MOD); }
long long tri(pnt A, pnt B, pnt C) { return (A ^ B) + (B ^ C) + (C ^ A); }
int r[1000000];
long long suma[2000000], sumb[2000000];
pnt Q[2000000], R[2000000];
long long calc(int l, int r) {
  long long ret = r * sub(suma[r - 1], suma[l - 1]) % MOD;
  ret = sub(ret, sub(sumb[r - 1], sumb[l - 1]));
  pnt X = sub(R[r], R[l]);
  ret = add(ret, pro(X, Q[l]));
  return ret;
}
int main() {
  int n = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%lld%lld", &P[i].x, &P[i].y), P[i + n] = P[i];
  for (int i = 1; i <= 2 * n; i++) Q[i].x = MO(P[i].x), Q[i].y = MO(P[i].y);
  for (int i = 1; i <= 2 * n - 1; i++)
    suma[i] = pro(P[i], P[i + 1]), sumb[i] = suma[i] * i % MOD;
  for (int i = 1; i <= 2 * n - 1; i++)
    suma[i] = add(suma[i], suma[i - 1]), sumb[i] = add(sumb[i], sumb[i - 1]),
    R[i] = add(R[i - 1], Q[i]);
  long long Sl = 0, Sr = 0;
  for (int i = 1; i <= n; i++) Sl += (P[i] ^ P[i + 1]);
  long long ans = 0, S = Sl % MOD;
  r[0] = 2;
  for (int i = 1; i <= n; i++) {
    int j = r[i - 1];
    if (i > 1) {
      Sl += tri(P[i - 1], P[i], P[j]), Sr -= tri(P[i - 1], P[i], P[j]);
    }
    while (j + 1 <= i + n - 1 &&
           Sr + tri(P[i], P[j], P[j + 1]) <= Sl - tri(P[i], P[j], P[j + 1])) {
      Sr += tri(P[i], P[j], P[j + 1]), Sl -= tri(P[i], P[j], P[j + 1]);
      j++;
    }
    r[i] = j;
    ans = add(ans, (r[i] - i - 1) * S % MOD);
    ans = sub(ans, 2 * (calc(i, r[i])) % MOD);
  }
  printf("%lld", ans);
}
