#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T min(T a, T b, T c) {
  return min(min(a, b), c);
}
template <class T>
inline T min(T a, T b, T c, T d) {
  return min(min(a, b), min(c, d));
}
template <class T>
inline T max(T a, T b, T c) {
  return max(max(a, b), c);
}
template <class T>
inline T max(T a, T b, T c, T d) {
  return max(max(a, b), max(c, d));
}
const int INF = 1e9;
const long long INF_LL = 4e18;
const long long MOD = 1e9 + 7L;
const double pi = acos(-1.0);
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};
int n;
long long tot = 0, sml = 0, sp, spi, sx, sy;
struct P {
  long long x, y;
  long long operator*(const P& b) const { return -x * b.y + b.x * y; }
};
P p[500005 << 1];
void add_point(int b) {
  sx += p[b].x;
  sy += p[b].y;
  sp += p[b - 1] * p[b];
  spi += (p[b - 1] * p[b] % MOD) * (long long)(b - 1) % MOD;
  spi %= MOD;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld%lld", &p[i].x, &p[i].y);
    p[i + n] = p[i];
  }
  for (int i = 0; i < n; i++) tot += p[i] * p[i + 1];
  sx = p[0].x + p[1].x;
  sy = p[0].y + p[1].y;
  sp = p[0] * p[1];
  spi = 0L;
  for (int i = 0, j = 1; i < n; i++) {
    while (j + 1 <= i + n - 2) {
      long long x = p[j] * p[j + 1];
      long long y = p[j + 1] * p[i];
      unsigned long long tmp = 2L * (sp + x + y);
      if (tmp < (unsigned long long)tot ||
          (tmp == (unsigned long long)tot && j + 1 < n)) {
        add_point(++j);
      } else
        break;
    }
    P ps = P{sx % MOD, sy % MOD};
    long long cur_sml = (sp % MOD * (long long)j - spi) % MOD + ps * p[i] % MOD;
    cur_sml %= MOD;
    sml += cur_sml;
    sml %= MOD;
    sx -= p[i].x;
    sy -= p[i].y;
    sp -= p[i] * p[i + 1];
    spi -= p[i] * p[i + 1] % MOD * (long long)(i) % MOD;
    spi %= MOD;
  }
  long long ans =
      ((long long)n * (n - 3) / 2L % MOD * (tot % MOD) - 2L * sml % MOD) % MOD;
  while (ans < 0) ans += MOD;
  cout << ans << endl;
  return 0;
}
