#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007, inv2 = 500000004;
inline long long regulate(long long x) {
  x %= mod;
  if (x < 0) x += mod;
  return x;
}
inline unsigned long long regulate(unsigned long long x) {
  x %= mod;
  return x;
}
inline int add(int a, int b) {
  if ((a += b) >= mod) a -= mod;
  return a;
}
inline int dec(int a, int b) {
  if ((a -= b) < 0) a += mod;
  return a;
}
inline int mult(int a, int b) {
  long long t = 1ll * a * b;
  if (t >= mod) t %= mod;
  return t;
}
class vec {
 public:
  long long x, y;
  vec() {}
  vec(long long tx, long long ty) { x = tx, y = ty; }
  vec operator-(const vec &t) const { return vec(x - t.x, y - t.y); }
  long long operator*(const vec &t) const { return x * t.y - y * t.x; }
} v[500010];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld%lld", &v[i].x, &v[i].y);
  unsigned long long area = 0;
  for (int i = 2; i < n; i++) area += (v[i] - v[0]) * (v[i - 1] - v[0]);
  int ans = 0, cnt = 0, sum = 0;
  unsigned long long curarea = 0;
  int sx = 0, sy = 0;
  for (int i = 0, j = 0; i < n; i++) {
    while (1) {
      int k = (j + 1) % n;
      long long w = (v[k] - v[i]) * (v[j] - v[i]);
      if (2 * (curarea + w) >= area) {
        if (2 * (curarea + w) == area) cnt++;
        break;
      }
      curarea += w;
      sum = add(sum, regulate(curarea));
      vec c = v[k] - v[i];
      sx = add(sx, regulate(c.x));
      sy = add(sy, regulate(c.y));
      j = k;
    }
    ans = dec(ans, add(sum, sum));
    int k = (i + 1) % n;
    curarea -= (v[j] - v[i]) * (v[k] - v[i]);
    sum = dec(sum, regulate(vec(sx, sy) * (v[k] - v[i])));
    vec c = v[k] - v[i];
    sx = dec(sx, mult((j - i + n) % n, regulate(c.x)));
    sy = dec(sy, mult((j - i + n) % n, regulate(c.y)));
  }
  ans = add(ans, mult(((1ll * n * (n - 3) - cnt) / 2) % mod, area % mod));
  printf("%d\n", ans);
  return 0;
}
