#include <bits/stdc++.h>
using namespace std;
const int N = 500010;
const int mod = 1000000007;
pair<long long, long long> a[N << 2];
long long xmult(pair<long long, long long> a, pair<long long, long long> b) {
  return b.first * a.second - a.first * b.second;
}
pair<long long, long long> sum[N << 2];
long long sum1[N << 2], sum2[N << 2];
long long get_sum1(int first, int second) {
  if (!first) return sum1[second];
  return sum1[second] - sum1[first - 1];
}
long long get_sum2(int first, int second) {
  if (!first) return sum2[second];
  return sum2[second] - sum2[first - 1];
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld%lld", &a[i].first, &a[i].second);
  for (int i = n; i < 3 * n; i++) a[i] = a[i - n];
  long long tot = 0;
  for (int i = 0; i < n; i++) {
    tot += xmult(a[i], a[i + 1]);
  }
  for (int i = 0; i < 3 * n; i++) {
    if (!i)
      sum[i] = a[i];
    else
      sum[i].first = sum[i - 1].first + a[i].first,
      sum[i].second = sum[i - 1].second + a[i].second;
  }
  for (int i = 0; i + 1 < 3 * n; i++) {
    long long p = xmult(a[i], a[i + 1]) % mod;
    if (!i)
      sum1[0] = p % mod;
    else
      sum1[i] = (sum1[i - 1] + p) % mod;
    if (!i)
      sum2[0] = (i + 1) * p % mod;
    else
      sum2[i] = (sum2[i - 1] + p * (i + 1)) % mod;
  }
  long long all = 0;
  long long ans = 0;
  for (int i = 0, j = 0; i < n; i++) {
    while (true) {
      unsigned long long tmp =
          (unsigned long long)2 *
          (all + xmult(a[j], a[j + 1]) + xmult(a[j + 1], a[i]));
      if ((tmp <= tot && j + 1 < n) || tmp < tot) {
        all += xmult(a[j], a[j + 1]);
        j++;
      } else
        break;
    }
    ans = (ans + xmult(make_pair((sum[j].first - sum[i].first) % mod,
                                 (sum[j].second - sum[i].second) % mod),
                       a[i])) %
          mod;
    ans = (ans + (j + 1) * get_sum1(i, j - 1) - get_sum2(i, j - 1)) % mod;
    all -= xmult(a[i], a[i + 1]);
  }
  ans = 2 * ans % mod;
  ans = (tot % mod * n % mod * (n - 3) % mod * (mod + 1) / 2 % mod - ans) % mod;
  if (ans < 0) ans += mod;
  cout << ans << endl;
  return 0;
}
