#include <bits/stdc++.h>
using namespace std;
int read() {
  char ch;
  int sig = 1;
  for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') sig = -1;
  int x = ch - '0';
  for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
    x = x * 10 + ch - '0';
  return x * sig;
}
const int N = 1e6 + 5;
const long long Mo = 1e9 + 7;
struct P {
  long long x, y;
  P(long long _x = 0, long long _y = 0) {
    x = _x;
    y = _y;
  }
  friend P operator+(P a, P b) { return P(a.x + b.x, a.y + b.y); }
  friend P operator-(P a, P b) { return P(a.x - b.x, a.y - b.y); }
  friend long long operator^(P a, P b) { return a.x * b.y - a.y * b.x; }
} p[N];
int n;
long long S, sq[N], sx[N], sy[N];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) p[i].x = read(), p[i].y = read();
  for (int i = 1; i <= n; i++) p[i + n] = p[i];
  for (int i = 1; i <= n; i++) S += p[i + 1] ^ p[i];
  long long ans = 0, sum = 0;
  for (int i = 1; i <= n * 2; i++) {
    (sum += p[i] ^ (p[i - 1])) %= Mo;
    sq[i] = (sq[i - 1] + sum) % Mo;
    sx[i] = (sx[i - 1] + p[i].x) % Mo;
    sy[i] = (sy[i - 1] + p[i].y) % Mo;
  }
  long long ns = S % Mo;
  int pos = 3;
  sum = 0;
  for (int i = 2; i <= pos; i++) sum += p[i] ^ p[i - 1];
  long long now = 0;
  for (int i = 1; i <= n; i++) {
    (now += p[i + 1] ^ p[i]) %= Mo;
    sum -= p[i + 1] ^ p[i];
    if (pos < i + 2) pos++, sum += p[pos] ^ p[pos - 1];
    while (pos <= i + n - 2) {
      long long ar = sum;
      ar -= p[i] ^ p[i + 1];
      ar += p[i] ^ p[pos];
      if (ar < S - ar)
        pos++, sum += p[pos] ^ p[pos - 1];
      else
        break;
    }
    int ls = i + 2, rs = pos - 1;
    long long dx = (sx[rs] - sx[ls - 1]) % Mo, dy = (sy[rs] - sy[ls - 1]) % Mo;
    if (ls <= rs) {
      (ans += ns * (rs - ls + 1) % Mo) %= Mo;
      (ans -= (sq[rs] - sq[ls - 1]) % Mo * 2 % Mo) %= Mo;
      (ans += now * 2 % Mo * (rs - ls + 1) % Mo) %= Mo;
      (ans += (p[i] ^ p[i + 1]) % Mo * (rs - ls + 1) % Mo * 2 % Mo) %= Mo;
      (ans -= (p[i] ^ P(dx, dy)) % Mo * 2 % Mo) %= Mo;
    }
    ls = pos, rs = i + n - 2, dx = (sx[rs] - sx[ls - 1]) % Mo,
    dy = (sy[rs] - sy[ls - 1]) % Mo;
    if (ls <= rs) {
      (ans -= ns * (rs - ls + 1) % Mo) %= Mo;
      (ans += (sq[rs] - sq[ls - 1]) % Mo * 2 % Mo) %= Mo;
      (ans -= now * 2 % Mo * (rs - ls + 1) % Mo) %= Mo;
      (ans -= (p[i] ^ p[i + 1]) % Mo * (rs - ls + 1) % Mo * 2 % Mo) %= Mo;
      (ans += (p[i] ^ P(dx, dy)) % Mo * 2 % Mo) %= Mo;
    }
  }
  ans = ans * (Mo + 1) / 2 % Mo;
  printf("%lld\n", (ans + Mo) % Mo);
  return 0;
}
