#include <bits/stdc++.h>
using namespace std;
inline int mod(int x) { return x >= 1000000007 ? x - 1000000007 : x; }
int a[1000005], b[1000005], c, d, e, f, i, j, n, x;
long long y, z;
inline long long mul(int u, int v, int w) {
  return (long long)(a[v] - a[u]) * (b[w] - b[u]) -
         (long long)(a[w] - a[u]) * (b[v] - b[u]);
}
int main() {
  for (scanf("%d", &n), i = n; i; i--)
    scanf("%d%d", a + i, b + i), a[n + i] = a[i], b[n + i] = b[i];
  for (i = 1; i <= n; i++) z += mul(0, i, i + 1);
  for (i = j = 1; i <= n; y -= mul(i, i + 1, j),
      x = (x + c +
           (e + (long long)(1000000007 - j + i) * mod(a[i] + 1000000007)) %
               1000000007 * mod(b[i] + 1000000007) +
           ((long long)(j - i) * mod(b[i] + 1000000007) + 1000000007 - f) %
               1000000007 * mod(a[i] + 1000000007)) %
                          1000000007,
      c = (c + (long long)mod(mul(0, i, i + 1) % 1000000007 + 1000000007) *
                   (1000000007 - j + i)) %
                          1000000007,
      d = mod(d + mod(1000000007 - mul(0, i, i + 1) % 1000000007)),
      e = mod(1000000007 + e - mod(a[++i] + 1000000007)),
      f = mod(1000000007 + f - mod(b[i] + 1000000007)))
    while (mul(i, j, j + 1) << 1 < z - y - y ||
           mul(i, j, j + 1) << 1 == z - y - y && j < n)
      y += mul(i, j, j + 1),
          d = mod(d + mod(mul(0, j, j + 1) % 1000000007 + 1000000007)),
          c = mod(c + d), e = mod(e + mod(a[++j] + 1000000007)),
          f = mod(f + mod(b[j] + 1000000007));
  return 0 * printf("%lld\n",
                    (z % 1000000007 * (((n - 3ll) * n >> 1) % 1000000007) +
                     (1000000007 - x << 1)) %
                        1000000007);
}
