#include <bits/stdc++.h>
using namespace std;
const int N = 500010;
const int MOD = 1e9 + 7;
int n, x[N], y[N], sx[N], sy[N], sxy[N], st[N];
long long t[N];
long long s;
int get(long long a) {
  if (a > 0) return (a % MOD);
  return (MOD - abs(a) % MOD) % MOD;
  return (MOD + a) % MOD;
}
void add(int &a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
int sum(long long a, long long b) { return (get(a) + get(b)) % MOD; }
int product(long long a, long long b) { return (1ll * get(a) * get(b)) % MOD; }
long long getArea(int i, int j) {
  long long res = t[j] - t[i] + 1ll * (x[i] - x[j]) * (y[i] + y[j]);
  return res;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
  sx[0] = x[0];
  sy[0] = y[0];
  sxy[0] = product(x[0], y[0]);
  for (int i = 1; i < n; i++) {
    sx[i] = sum(sx[i - 1], x[i]);
    sy[i] = sum(sy[i - 1], y[i]);
    sxy[i] = sum(sxy[i - 1], product(x[i], y[i]));
  }
  s = 0;
  for (int i = 0; i < n - 1; i++) {
    s += 1ll * (x[i + 1] - x[i]) * (y[i + 1] + y[i]);
  }
  s += 1ll * (x[0] - x[n - 1]) * (y[0] + y[n - 1]);
  t[0] = 0;
  for (int i = 1; i < n; i++)
    t[i] = t[i - 1] + 1ll * (x[i] - x[i - 1]) * (y[i] + y[i - 1]);
  st[0] = get(t[0]);
  for (int i = 1; i < n; i++) st[i] = sum(st[i - 1], t[i]);
  int k = 2;
  int ans = 0;
  for (int i = 0; i <= n - 2; i++) {
    int j;
    if (i == 0)
      j = n - 2;
    else
      j = n - 1;
    if (k < i + 2) k++;
    while (k <= j) {
      long long tmp = getArea(i, k);
      if (tmp >= s - tmp) break;
      k++;
    }
    int k1 = k - i - 2;
    int k2 = j - k + 1;
    if (k1 > 0) {
      add(ans, product(k1, s));
      add(ans, product(-2, st[k - 1] - st[i + 1]));
      add(ans, product(2 * k1, t[i]));
      add(ans, product(-2, product(k1, product(x[i], y[i]))));
      add(ans, product(-2, product(x[i], sy[k - 1] - sy[i + 1])));
      add(ans, product(2, product(y[i], sx[k - 1] - sx[i + 1])));
      add(ans, product(2, sxy[k - 1] - sxy[i + 1]));
    }
    if (k2 > 0) {
      add(ans, product(-k2, s));
      add(ans, product(2, st[j] - st[k - 1]));
      add(ans, product(-2 * k2, t[i]));
      add(ans, product(2, product(k2, product(x[i], y[i]))));
      add(ans, product(2, product(x[i], sy[j] - sy[k - 1])));
      add(ans, product(-2, product(y[i], sx[j] - sx[k - 1])));
      add(ans, product(-2, sxy[j] - sxy[k - 1]));
    }
  }
  cout << ans;
  return 0;
}
