#include <bits/stdc++.h>
using namespace std;
const int maxn = 500010;
const int mod = 1e9 + 7;
long long S;
int n = 0, ans = 0;
struct point {
  long long x, y;
  point(const long long x_ = 0, long long y_ = 0) : x(x_), y(y_) {}
} v[maxn], sv[maxn << 1];
long long w[maxn], sw[maxn], ssw[maxn << 1];
point operator+(const point &p1, const point &p2) {
  return point(p1.x + p2.x, p1.y + p2.y);
}
point operator-(const point &p1, const point &p2) {
  return point(p1.x - p2.x, p1.y - p2.y);
}
long long operator*(const point &p1, const point &p2) {
  return p1.x * p2.y - p1.y * p2.x;
}
long long sum_w(int l, int r) {
  if (l > n) {
    return sw[r - n] - sw[l - 1 - n];
  } else if (r <= n) {
    return sw[r] - sw[l - 1];
  } else {
    return sw[n] - sw[l - 1] + sw[r - n];
  }
}
int cal_sw(int i) {
  if (i <= n)
    return sw[i] % mod;
  else
    return (sw[n] % mod + sw[i - n] % mod) % mod;
}
long long cals(int l, int r) {
  return sum_w(l, r - 1) + v[(r - 1) % n + 1] * v[(l - 1) % n + 1];
}
int calss(int l, int r) {
  int ret = (ssw[r - 1] + mod - ssw[l - 1]) % mod;
  ret = (ret + mod - 1LL * (r - l) * cal_sw(l - 1) % mod) % mod;
  point t = sv[r] - sv[l];
  t.x %= mod, t.y %= mod;
  ret = (ret + t * v[(l - 1) % n + 1]) % mod;
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld%lld", &v[i].x, &v[i].y);
  reverse(v + 1, v + n + 1);
  for (int i = 1; i <= n; i++) w[i] = v[i] * v[i + 1];
  for (int i = 1; i <= 2 * n; i++) sv[i] = sv[i - 1] + v[(i - 1) % n + 1];
  w[n] = v[n] * v[1];
  for (int i = 1; i <= n; i++) sw[i] = sw[i - 1] + w[i];
  for (int i = 1; i <= 2 * n; i++) ssw[i] = (ssw[i - 1] + cal_sw(i)) % mod;
  S = cals(1, n);
  int cur = 1;
  ans = 1LL * (S % mod) * ((1LL * n * (n - 3) / 2) % mod) % mod;
  for (int i = 1; i <= n; i++) {
    cur = max(cur, i);
    while (cur + 1 < n + i && cals(i, cur + 1) <= S / 2) ++cur;
    ans = (ans + mod - 2LL * (calss(i, cur) % mod) % mod) % mod;
    if (cals(i, cur) == S / 2 && S % 2 == 0) ans = (ans + (S / 2) % mod) % mod;
  }
  printf("%d\n", ans);
  return 0;
}
