#include <bits/stdc++.h>
template <typename T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool flag = false;
  while (!isdigit(c)) {
    if (c == '-') flag = true;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  if (flag) x = -x;
}
using namespace std;
const int P = 1e9 + 7;
const int inv2 = 5e8 + 4;
int n;
struct vectors {
  long long x, y;
  vectors(long long xx = 0, long long yy = 0) { x = xx, y = yy; }
  vectors operator+(const vectors a) const { return vectors(x + a.x, y + a.y); }
  vectors operator-(const vectors a) const { return vectors(x - a.x, y - a.y); }
  long long operator*(const vectors a) const { return x * a.y - y * a.x; }
} vec[2001000];
unsigned long long Sum[2001000];
inline unsigned long long get_Sum(int l, int r) {
  unsigned long long res = Sum[r - 1] - Sum[l - 1] + vec[l] * vec[r];
  return res;
}
long long sum[2001000], ssum[2001000], sx[2001000], sy[2001000];
inline long long get_S(int l, int r) {
  long long res = sum[r - 1] - sum[l - 1] + vec[l] * vec[r];
  return res % P;
}
inline long long get_SS(int l, int r) {
  long long res = ssum[r - 1] - ssum[l - 1] - 1ll * (r - l) * sum[l - 1];
  res += vec[l].x * (sy[r] - sy[l]) - vec[l].y * (sx[r] - sx[l]);
  return res % P;
}
int main() {
  read(n);
  for (int i = 1; i <= n; ++i) read(vec[i].x), read(vec[i].y);
  for (int i = 1; i <= n; ++i) {
    sx[i] = (sx[i - 1] + vec[i].x) % P;
    sy[i] = (sy[i - 1] + vec[i].y) % P;
  }
  for (int i = n + 1; i <= n + n; ++i) {
    vec[i] = vec[i - n];
    sx[i] = (sx[i - 1] + vec[i].x) % P;
    sy[i] = (sy[i - 1] + vec[i].y) % P;
  }
  vec[n + n + 1] = vec[1], vec[n + n + 2] = vec[2];
  for (int i = 1; i <= n + n + 1; ++i)
    sum[i] = (sum[i - 1] + vec[i + 1] * vec[i]) % P;
  for (int i = 1; i <= n + n + 1; ++i)
    Sum[i] = Sum[i - 1] + vec[i + 1] * vec[i];
  for (int i = 1; i <= n + n; ++i) ssum[i] = (ssum[i - 1] + sum[i]) % P;
  unsigned long long tots = 0;
  for (int i = 1; i <= n; ++i) tots += vec[i + 1] * vec[i];
  int ptr = 3;
  long long ans = 0;
  for (int i = 1; i <= n; ++i) {
    while (get_Sum(i, ptr) <= tots - get_Sum(i, ptr)) ++ptr;
    ans =
        (ans - get_SS(i, ptr - 1) + get_SS(i, i + n - 2) - get_SS(i, ptr - 1)) %
        P;
    ans = (ans - ((n - ptr + i - 1) * get_S(i, i + n) -
                  (get_SS(i, i + n - 2) - get_SS(i, ptr - 1)))) %
          P;
    ans = (ans + (ptr - i - 2) * get_S(i, i + n) - get_SS(i, ptr - 1)) % P;
  }
  ans = ans * inv2 % P;
  printf("%lld\n", (ans % P + P) % P);
  return 0;
}
