#include <bits/stdc++.h>
using namespace std;
int add(int const a, int const b) {
  int ret = (a + b) % 1000000007;
  if (ret < 0) ret += 1000000007;
  return ret;
}
int mul(int const a, int const b) {
  int ret = (1ll * a * b) % 1000000007;
  if (ret < 0) ret += 1000000007;
  return ret;
}
struct TPoint {
  long long x, y;
  TPoint(long long x = 0, long long y = 0) : x(x), y(y){};
  TPoint operator+(TPoint const& a) const { return TPoint(x + a.x, y + a.y); }
  TPoint operator-(TPoint const& a) const { return TPoint(x - a.x, y - a.y); }
  long long operator*(TPoint const& a) { return x * a.y - a.x * y; }
};
int n;
long long sumCCW[1000006];
int sumMod[1000006], sumSum[1000006];
TPoint point[1000006], sumPoint[1000006];
void setup() {
  cin >> n;
  for (int i = n; i >= 1; i--) {
    cin >> point[i].x >> point[i].y;
    point[i + n] = point[i];
  }
  sumPoint[1] = point[1];
  for (int i = 2; i <= n << 1; i++) {
    sumPoint[i] = sumPoint[i - 1] + point[i];
    long long cross = point[i - 1] * point[i];
    sumCCW[i] = sumCCW[i - 1] + cross;
    sumMod[i] = (sumMod[i - 1] + cross % 1000000007) % 1000000007;
    sumSum[i] = (sumSum[i - 1] + sumMod[i]) % 1000000007;
  }
}
long long doubleArea(int a, int b) {
  return sumCCW[b] - sumCCW[a] + point[b] * point[a];
}
int sumArea(int a, int b) {
  int fromAtoB = add(add(sumSum[b], -sumSum[a]), -mul(sumMod[a], b - a));
  TPoint sumP = sumPoint[b] - sumPoint[a];
  sumP.x %= 1000000007, sumP.y %= 1000000007;
  int fromBtoA = sumP * point[a] % 1000000007;
  return add(fromAtoB, fromBtoA);
}
void xuly() {
  int totalArea = sumMod[n + 1], totalChoice = 0;
  int r = 1, sumSmall = 0, ans;
  for (int l = 1; l <= n; l++) {
    while (doubleArea(l, r + 1) <= doubleArea(r + 1, l + n)) r++;
    sumSmall = add(sumSmall, sumArea(l, r));
    totalChoice = add(totalChoice, r - l - 1);
  }
  ans = add(mul(totalArea, totalChoice), -mul(sumSmall, 2));
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  setup();
  xuly();
  return 0;
}
