#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5, mod = 1e9 + 7;
int read() {
  int x = 0, f = 1;
  char ch;
  while (!isdigit(ch = getchar())) (ch == '-') && (f = -f);
  for (x = ch ^ 48; isdigit(ch = getchar());
       x = (x << 3) + (x << 1) + (ch ^ 48))
    ;
  return x * f;
}
template <class T>
T Max(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T Min(T a, T b) {
  return a < b ? a : b;
}
int n, R = 1;
unsigned long long S, all;
long long ans, s[N], t[N];
struct node {
  long long x, y;
  node(long long x = 0, long long y = 0) : x(x), y(y) {}
  friend node operator+(node a, node b) {
    return node((a.x + b.x) % mod, (a.y + b.y) % mod);
  }
  friend node operator-(node a, node b) { return node(a.x - b.x, a.y - b.y); }
  friend node operator*(node a, long long b) { return node(a.x * b, a.y * b); }
  friend long long operator*(node a, node b) { return a.x * b.y - a.y * b.x; }
} p[N], sum[N];
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) p[i].x = read(), p[i].y = read();
  for (int i = 1; i <= n; ++i) all += (p[i % n + 1] - p[0]) * (p[i] - p[0]);
  for (int i = n + 1; i <= 2 * n; ++i) p[i] = p[i - n];
  for (int i = 1; i <= 2 * n; ++i) s[i] = p[i] * p[i - 1] % mod;
  for (int i = 1; i <= 2 * n; ++i) s[i] = (s[i] + s[i - 1]) % mod;
  for (int i = 1; i <= 2 * n; ++i) t[i] = (t[i - 1] + s[i]) % mod;
  for (int i = 1; i <= 2 * n; ++i) sum[i] = sum[i - 1] + p[i];
  for (int i = 1; i <= n; ++i) {
    while (S + p[R] * p[i] + p[R + 1] * p[R] + p[i] * p[R + 1] <= all / 2) {
      S += p[R] * p[i] + p[R + 1] * p[R] + p[i] * p[R + 1];
      R++;
    }
    if (i != R) {
      long long s1 = ((t[R] - t[i] - 1LL * (R - i) * s[i] % mod +
                       p[i] * (sum[R] - sum[i]) % mod) %
                          mod +
                      mod) %
                     mod;
      ans = (ans + (all % mod * (R - i - 1) % mod - 2 * s1 % mod + mod) % mod) %
            mod;
      S += p[i] * p[i + 1] + p[i + 1] * p[R] + p[R] * p[i];
    }
  }
  cout << ans << endl;
  fclose(stdin);
  fclose(stdout);
  return 0;
}
