#include <bits/stdc++.h>
using namespace std;
void PR(vector<int>& v) {
  for (auto& x : v) cout << x << ' ';
  cout << endl;
}
const long long mod = 1000000007;
int main() {
  cin.sync_with_stdio(false);
  int N;
  cin >> N;
  vector<long long> x, y;
  x.reserve(N * 3);
  y.reserve(N * 3);
  x.resize(N);
  y.resize(N);
  for (int i = 0; i < int(N); ++i) {
    cin >> y[i] >> x[i];
  }
  for (int i = 0; i < int(N); ++i) x.push_back(x[i]), y.push_back(y[i]);
  for (int i = 0; i < int(N); ++i) x.push_back(x[i]), y.push_back(y[i]);
  long long A = 0;
  for (int i = 0; i < int(N); ++i) {
    A += x[i] * y[i + 1] - x[i + 1] * y[i];
  }
  long long a = 0, a2 = 0;
  vector<long long> xy(2 * N), rxy(2 * N), sumxy(2 * N), sumx(2 * N),
      sumy(2 * N);
  long long sxy = 0, sx = 0, sy = 0;
  for (int k = 0; k < int(2 * N); ++k) {
    sumxy[k] = sxy;
    sumx[k] = sx;
    sumy[k] = sy;
    rxy[k] = a2;
    xy[k] = a;
    sxy += rxy[k];
    sxy %= mod;
    sx += x[k];
    sx %= mod;
    sy += y[k];
    sy %= mod;
    a += x[k] * y[k + 1] - x[k + 1] * y[k];
    a2 += x[k] * y[k + 1] - x[k + 1] * y[k];
    a2 %= mod;
  }
  long long res = 0;
  for (int i = 0; i < int(N); ++i) {
    int lo = 1, hi = N - 1;
    auto works = [&](int it) {
      int j = i + it;
      long long a = xy[j] - xy[i];
      a += x[j] * y[i] - x[i] * y[j];
      return a <= A / 2;
    };
    while (lo + 1 < hi) {
      int mid = (lo + hi) / 2;
      if (works(mid))
        lo = mid;
      else
        hi = mid;
    }
    int count = (lo + 1 - 2);
    res += count * (A % mod) % mod;
    res += 2 * count * rxy[i] % mod;
    int start = i + 2;
    int end = i + lo + 1;
    res -= 2 * (sumxy[end] - sumxy[start]);
    res -= 2 * (sumx[end] - sumx[start]) * y[i] % mod;
    res += 2 * (sumy[end] - sumy[start]) * x[i] % mod;
    res %= mod;
  }
  if (res < 0) res += mod;
  cout << res << endl;
}
