#include <bits/stdc++.h>
const int N = 500005, mod = 1000000007;
int n;
std::pair<int, int> p[N];
long long qaq(std::pair<int, int> a, std::pair<int, int> b) {
  return (long long)a.first * b.second - (long long)a.second * b.first;
}
int operator*(std::pair<int, int> a, std::pair<int, int> b) {
  int ret = qaq(a, b) % mod;
  return ret + (ret >> 31 & mod);
}
void up(std::pair<int, int> &a, std::pair<int, int> b, int k = 1) {
  a.first = (mod + a.first % mod + (long long)k * (b.first % mod + mod)) % mod;
  a.second =
      (mod + a.second % mod + (long long)k * (b.second % mod + mod)) % mod;
}
void up(int &first, int second, int k = 1) {
  first = (first + (long long)second * k) % mod;
}
int main() {
  std::ios::sync_with_stdio(0), std::cin.tie(0);
  std::cin >> n;
  for (int i = 0; i < n; ++i) std::cin >> p[i].first >> p[i].second;
  std::reverse(p, p + n);
  long long sum = 0, area = 0;
  for (int i = 0; i < n; ++i) sum += qaq(p[i], p[(i + 1) % n]);
  std::pair<int, int> qsum(0, 0);
  int pre0 = 0, pre1 = 0, ans = 0;
  int total = (long long)n * (n - 3) / 2 % mod, qwq = 0;
  for (int i = 0, j = 0; i < n; ++i) {
    while ((area + qaq(p[j], p[(j + 1) % n]) + qaq(p[(j + 1) % n], p[i])) <=
           sum / 2) {
      area += qaq(p[j], p[(j + 1) % n]);
      up(pre0, p[j] * p[(j + 1) % n]);
      up(pre1, pre0), j = (j + 1) % n;
      up(qsum, p[j]);
    }
    if ((area + qaq(p[j], p[i])) * 2 == sum) ++qwq;
    up(ans, qsum * p[i]);
    up(ans, pre1);
    area -= qaq(p[i], p[(i + 1) % n]);
    up(qsum, p[(i + 1) % n], mod - 1);
    up(pre1, p[i] * p[(i + 1) % n], mod - (j + n - i) % n);
    up(pre0, p[i] * p[(i + 1) % n], mod - 1);
  }
  total += qwq / 2;
  std::cout << (sum % mod * total % mod + (mod - 2LL) * ans) % mod << '\n';
  return 0;
}
