#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch - '0' < 0 || ch - '0' > 9) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch - '0' >= 0 && ch - '0' <= 9) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int N = 2e6 + 10, mod = 1e9 + 7;
int n;
struct point {
  long long x, y;
} p[N * 2], sum[N * 2];
point operator+(point a, point b) {
  return (point){(a.x + b.x) % mod, (a.y + b.y) % mod};
}
point operator-(point a, point b) { return (point){(a.x - b.x), (a.y - b.y)}; }
long long operator*(point a, point b) { return a.x * b.y - a.y * b.x; }
unsigned long long area;
long long s[N * 2], ss[N * 2], ans;
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++) area += (p[i % n + 1] - p[0]) * (p[i] - p[0]);
  for (int i = n + 1; i <= 2 * n; i++) p[i] = p[i - n];
  for (int i = 1; i <= 2 * n; i++) s[i] = p[i] * p[i - 1] % mod;
  for (int i = 1; i <= 2 * n; i++) s[i] = (s[i] + s[i - 1]) % mod;
  for (int i = 1; i <= 2 * n; i++) ss[i] = (ss[i - 1] + s[i]) % mod;
  for (int i = 1; i <= 2 * n; i++) sum[i] = sum[i - 1] + p[i];
  int r = 1;
  unsigned long long ts = 0;
  for (int l = 1; l <= n; l++) {
    while (ts + p[r] * p[l] + p[r + 1] * p[r] + p[l] * p[r + 1] <= area / 2) {
      ts += p[r] * p[l] + p[r + 1] * p[r] + p[l] * p[r + 1];
      r++;
    }
    if (l != r) {
      long long s1 = (ss[r] - ss[l] + mod) % mod;
      s1 = (s1 - (long long)(r - l) * s[l] % mod + mod) % mod;
      s1 = (s1 + p[l] * (sum[r] - sum[l]) % mod) % mod;
      ans =
          (ans + (area % mod * (r - l - 1) % mod - 2 * s1 % mod + mod) % mod) %
          mod;
      ts += p[l] * p[l + 1] + p[l + 1] * p[r] + p[r] * p[l];
    }
  }
  printf("%lld", ans);
  return 0;
}
