#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
const int mod = 1e9 + 7;
int n;
unsigned long long all;
long long s[N << 1], ss[N << 1];
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
struct node {
  long long x, y;
} p[N << 1], sum[N << 1];
node operator+(const node& a, const node& b) {
  return node{(a.x + b.x) % mod, (a.y + b.y) % mod};
}
node operator-(const node& a, const node& b) {
  return node{a.x - b.x, a.y - b.y};
}
node operator*(const node& a, const long long& b) {
  return node{a.x * b, a.y * b};
}
long long operator*(const node& a, const node& b) {
  return a.x * b.y - a.y * b.x;
}
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++) all += (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 S = 0;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    while (S + p[r] * p[i] + p[r + 1] * p[r] + p[i] * p[r + 1] <= all / 2) {
      S += p[r] * p[i] + p[r + 1] * p[r] + p[i] * p[r + 1];
      r++;
    }
    if (i != r) {
      long long s1 = ((ss[r] - ss[i] - 1ll * (r - i) * s[i] % mod +
                       p[i] * (sum[r] - sum[i]) % mod) %
                          mod +
                      mod) %
                     mod;
      ans = (ans + (all % mod * (r - i - 1) % mod - 2 * s1 % mod + mod) % mod) %
            mod;
      S += p[i] * p[i + 1] + p[i + 1] * p[r] + p[r] * p[i];
    }
  }
  printf("%lld\n", ans);
  fclose(stdin);
  fclose(stdout);
  return 0;
}
