#include <bits/stdc++.h>
using namespace std;
const int RLEN = 1 << 20 | 1;
inline char gc() {
  static char ibuf[RLEN], *ib, *ob;
  (ib == ob) && (ob = (ib = ibuf) + fread(ibuf, 1, RLEN, stdin));
  return (ib == ob) ? EOF : *ib++;
}
inline int read() {
  char ch = gc();
  int res = 0;
  bool f = 1;
  while (!isdigit(ch)) f ^= ch == '-', ch = gc();
  while (isdigit(ch)) res = (res + (res << 2) << 1) + (ch ^ 48), ch = gc();
  return f ? res : -res;
}
inline long long readll() {
  char ch = gc();
  long long res = 0;
  bool f = 1;
  while (!isdigit(ch)) f ^= ch == '-', ch = gc();
  while (isdigit(ch)) res = (res + (res << 2) << 1) + (ch ^ 48), ch = gc();
  return f ? res : -res;
}
inline int readstring(char *s) {
  int top = 0;
  char ch = gc();
  while (isspace(ch)) ch = gc();
  while (!isspace(ch) && ch != EOF) s[++top] = ch, ch = gc();
  s[top + 1] = '\0';
  return top;
}
template <typename tp>
inline void chemx(tp &a, tp b) {
  a = max(a, b);
}
template <typename tp>
inline void chemn(tp &a, tp b) {
  a = min(a, b);
}
const int mod = 1e9 + 7;
inline int add(int a, int b) {
  return (a + b) >= mod ? (a + b - mod) : (a + b);
}
inline int dec(int a, int b) { return (a < b) ? (a - b + mod) : (a - b); }
inline int mul(int a, int b) {
  static long long r;
  r = (long long)a * b;
  return (r >= mod) ? (r % mod) : r;
}
inline void Add(int &a, int b) { a = (a + b) >= mod ? (a + b - mod) : (a + b); }
inline void Dec(int &a, int b) { a = (a < b) ? (a - b + mod) : (a - b); }
inline void Mul(int &a, int b) {
  static long long r;
  r = (long long)a * b;
  a = (r >= mod) ? (r % mod) : r;
}
inline int ksm(int a, int b, int res = 1) {
  for (; b; b >>= 1, Mul(a, a)) (b & 1) && (Mul(res, a), 1);
  return res;
}
inline int Inv(int x) { return ksm(x, mod - 2); }
inline int fix(long long x) {
  x %= mod;
  return (x < 0) ? x + mod : x;
}
const int N = 1000005;
struct pt {
  int x, y;
  pt(int _x = 0, int _y = 0) : x(_x), y(_y) {}
  friend inline pt operator+(const pt &a, const pt &b) {
    return pt(a.x + b.x, a.y + b.y);
  }
  friend inline pt operator-(const pt &a, const pt &b) {
    return pt(a.x - b.x, a.y - b.y);
  }
  friend inline long long operator*(const pt &a, const pt &b) {
    return (long long)a.x * b.y - (long long)a.y * b.x;
  }
} p[N];
int n, s1[N], s2[N], sx[N], sy[N];
long long s[N];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) p[i].x = read(), p[i].y = read();
  reverse(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) p[i + n] = p[i];
  for (int i = 1; i <= 2 * n; i++) {
    sx[i] = add(sx[i - 1], fix(p[i].x)), sy[i] = add(sy[i - 1], fix(p[i].y));
    if (i <= n) s[i] = s[i - 1] + p[i] * p[i + 1];
    s1[i] = fix(s[(i - 1) % n + 1]);
    if (i > n) Add(s1[i], s1[n]);
    s2[i] = add(s2[i - 1], s1[i]);
  }
  int res = 0;
  for (int l = 1, r = 1; l <= n; l++) {
    long long tmp = 0;
    while (r + 1 < l + n && (tmp = (r <= n ? s[r] : s[r - n] + s[n]) -
                                   s[l - 1] + p[r + 1] * p[l]) < (s[n] + 1) / 2)
      r++;
    if (s[n] % 2 == 0 && (tmp == s[n] / 2) && (r + 1) % n > l % n) r++;
    if (r == l + 1) continue;
    Add(res, dec(dec(s2[r - 1], s2[l]), mul(r - l - 1, s1[l])));
    Add(res, mul(r - l - 1, dec(s1[l], s1[l - 1])));
    Add(res, dec(mul(dec(sx[r], sx[l + 1]), fix(p[l].y)),
                 mul(dec(sy[r], sy[l + 1]), fix(p[l].x))));
  }
  res = dec(mul(fix((long long)n * (n - 3) / 2), s1[n]), mul(2, res));
  cout << res << '\n';
  return 0;
}
