#include <bits/stdc++.h>
using namespace std;
inline int gi() {
  char c = getchar();
  int x = 0, f = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') f = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) x = (x << 1) + (x << 3) + c - '0';
  return x * f;
}
const int N = 5e5 + 5, Mod = 1e9 + 7;
int x[N], y[N], n;
long long ara, sx[N], sy[N], ssum[N], ans;
long long sum[N];
long long cross(int i, int j) { return 1ll * x[i] * y[j] - 1ll * x[j] * y[i]; }
long long cross(long long x1, long long y1, long long x2, long long y2,
                bool b = true) {
  if (!b) return x1 * y2 - x2 * y1;
  x1 %= Mod, y1 %= Mod;
  return (x1 * y2 - x2 * y1) % Mod;
}
int main() {
  n = gi();
  for (int i = 1; i <= n; ++i) x[i] = gi(), y[i] = gi();
  for (int i = 3; i <= n; ++i)
    ara += cross(x[i] - x[1], y[i] - y[1], x[i - 1] - x[1], y[i - 1] - y[1], 0);
  for (int i = 2; i <= n; ++i)
    sum[i] = sum[i - 1] + cross(i, i - 1),
    ssum[i] = (ssum[i - 1] + sum[i]) % Mod;
  for (int i = 1; i <= n; ++i)
    sx[i] = sx[i - 1] + x[i], sy[i] = sy[i - 1] + y[i];
  for (int i = 1, j = 0; i <= n; ++i) {
    for (j = max(j, i + 2); j <= n - (i == 1); ++j)
      if (2ull * (sum[j] - sum[i] - cross(j, i)) > ara) break;
    const int m = n - (i == 1);
    int tmp = 0;
    tmp = (ssum[j - 1] - ssum[i + 1] - sum[i] % Mod * (j - i - 2)) % Mod;
    tmp = (tmp -
           cross(sx[j - 1] - sx[i + 1], sy[j - 1] - sy[i + 1], x[i], y[i])) %
          Mod;
    ans = (ans + ara % Mod * (j - i - 2) % Mod - 2 * tmp % Mod + Mod) % Mod;
    if (j > m) continue;
    tmp = (ssum[m] - ssum[j - 1] - sum[i] % Mod * (m - j + 1)) % Mod;
    tmp = (tmp - cross(sx[m] - sx[j - 1], sy[m] - sy[j - 1], x[i], y[i])) % Mod;
    ans = ((ans + tmp * 2 - ara % Mod * (m - j + 1) % Mod) % Mod + Mod) % Mod;
  }
  printf("%lld\n", ans);
}
