#include <bits/stdc++.h>
uint32_t readu32() {
  int c;
  while ((c = getchar_unlocked()) < '0')
    ;
  uint32_t n = c & 15U;
  while ((c = getchar_unlocked()) >= '0') n = n * 10 + (c & 15U);
  return n;
}
uint64_t readu64() {
  int c;
  while ((c = getchar_unlocked()) < '0')
    ;
  uint64_t n = c & 15U;
  while ((c = getchar_unlocked()) >= '0') n = n * 10 + (c & 15U);
  return n;
}
int32_t read32() {
  int c;
  while ((c = getchar_unlocked()) < '-')
    ;
  bool neg = c == '-';
  if (neg) c = getchar_unlocked();
  uint32_t n = c & 15U;
  while ((c = getchar_unlocked()) >= '0') n = n * 10 + (c & 15U);
  return neg ? -(int32_t)n : n;
}
int64_t read64() {
  int c;
  while ((c = getchar_unlocked()) < '-')
    ;
  bool neg = c == '-';
  if (neg) c = getchar_unlocked();
  uint64_t n = c & 15;
  while ((c = getchar_unlocked()) >= '0') n = n * 10 + (c & 15U);
  return neg ? -(int64_t)n : n;
}
template <typename T>
struct xgcd_s {
  T m, n, gcd;
};
template <typename T>
xgcd_s<T> xgcd(T a, T b) {
  T m[] = {1, 0}, n[] = {0, 1}, q[] = {0, 0};
  for (int i = 0;; i ^= 1) {
    m[i] -= m[i ^ 1] * q[i];
    n[i] -= n[i ^ 1] * q[i];
    if (!b) return xgcd_s<T>{m[i], n[i], a};
    q[i] = a / b;
    a %= b;
    std::swap(a, b);
  }
}
template <unsigned M()>
struct _intmod {
 private:
  struct _p {
    unsigned x;
  };
  _intmod(_p x) { n = x.x; }

 public:
  unsigned n;
  _intmod() { n = 0; }
  _intmod(int x) { n = x < 0 ? M() + x % (int)M() : x % M(); }
  _intmod(unsigned x) { n = x % M(); }
  _intmod(long long x) {
    n = unsigned(x < 0 ? M() + x % (long long)M() : x % M());
  }
  _intmod operator+(_intmod b) { return {n + b.n}; }
  _intmod operator*(_intmod b) {
    return {_p{unsigned((unsigned long long)n * b.n % M())}};
  }
  _intmod operator-(_intmod b) {
    return {_p{n >= b.n ? n - b.n : M() + n - b.n}};
  }
  _intmod operator-() { return {_p{n ? M() - n : 0U}}; }
  _intmod& operator+=(_intmod b) { return (*this = *this + b); }
  _intmod& operator-=(_intmod b) { return (*this = *this - b); }
  _intmod& operator/=(_intmod b) { return (*this = *this / b); }
  _intmod& operator*=(_intmod b) { return (*this = *this * b); }
  static _intmod mulinv(_intmod n) {
    xgcd_s<signed> x = xgcd<signed>(n.n, M());
    assert(x.gcd == 1);
    return x.m;
  }
  _intmod operator/(_intmod b) { return *this * mulinv(b); }
  bool operator==(_intmod b) { return n == b.n; }
  bool operator!=(_intmod b) { return n != b.n; }
  explicit operator int() { return n; }
};
template <unsigned M()>
std::ostream& operator<<(std::ostream& o, _intmod<M> n) {
  return o << n.n;
}
template <unsigned M()>
std::istream& operator>>(std::istream& i, _intmod<M>& n) {
  long long x;
  i >> x;
  n = x;
  return i;
}
template <unsigned M>
unsigned intmod_unsignedconst() {
  static_assert(M > 0 && M < (1U << 31), "modulus bad");
  return M;
}
template <unsigned* M>
unsigned intmod_unsignedptr() {
  return *M;
}
template <unsigned M>
using intmod = _intmod<intmod_unsignedconst<M> >;
template <unsigned* M>
using intmodv = _intmod<intmod_unsignedptr<M> >;
static_assert(std::is_trivially_copyable<intmod<3> >::value, "");
struct pi {
  intmod<1000000007> x, y;
};
struct pf {
  double x, y;
};
pi ai[500000];
pf af[500000];
double cpfc[500000];
intmod<1000000007> cpic[500000];
intmod<1000000007> cpicc[500000];
intmod<1000000007> xic[500000];
intmod<1000000007> yic[500000];
int n;
double taf;
using namespace std;
template <typename T>
T cu(T* a, int i, int j) {
  if (j < i) return 0;
  i %= n;
  j %= n;
  if (i <= j)
    return a[j] - (i ? a[i - 1] : 0);
  else
    return a[j] + a[n - 1] - a[i - 1];
}
intmod<1000000007> ccu(int i, int j) {
  if (j < i) return 0;
  i %= n;
  j %= n;
  if (!i) return cpicc[j];
  if (i <= j) return cpicc[j] - cpicc[i - 1] - cpic[i - 1] * (j - i + 1);
  return cpicc[n - 1] - cpicc[i - 1] - cpic[i - 1] * (n - i) + cpicc[j] +
         cu(cpic, i, n - 1) * (j + 1);
}
int half(int i) {
  int jl = i + 1, jh = i + n - 1;
  while (jl + 1 < jh) {
    int jm = (jl + jh) / 2;
    double a = cu(cpfc, i + 1, jm - 1) +
               af[(i) % n].x * (af[(i + 1) % n].y - af[(jm) % n].y) +
               af[(i) % n].y * (af[(jm) % n].x - af[(i + 1) % n].x);
    if (2. * a > taf)
      jh = jm;
    else
      jl = jm;
  }
  assert(jl + 1 == jh);
  return jl;
}
template <typename T, typename F>
void acc(T* a, F f) {
  T t = 0;
  for (int i = 0; i < n; i++) a[i] = t += f(i);
}
int main() {
  ios_base::sync_with_stdio(0);
  n = (readu32());
  for (int i = n; i--;) {
    int x = (read32()), y = (read32());
    ai[i].x = x;
    ai[i].y = y;
    af[i].x = x;
    af[i].y = y;
  }
  acc(cpfc, [](int i) {
    return af[(i) % n].x * af[(i + 1) % n].y -
           af[(i + 1) % n].x * af[(i) % n].y;
  });
  taf = cpfc[n - 1];
  acc(cpic, [](int i) {
    return ai[(i) % n].x * ai[(i + 1) % n].y -
           ai[(i + 1) % n].x * ai[(i) % n].y;
  });
  intmod<1000000007> tai = cpic[n - 1];
  acc(cpicc, [](int i) { return cpic[i]; });
  acc(xic, [](int i) { return ai[(i) % n].x; });
  acc(yic, [](int i) { return ai[(i) % n].y; });
  intmod<1000000007> amaj = 0, amin = 0;
  intmod<1000000007> nmaj = 0, nmin = 0;
  for (int i = 0; i < n; i++) {
    int m = half(i);
    intmod<1000000007> a1 =
        ccu(i + 1, m - 1) +
        ai[(i) % n].x * (ai[(i + 1) % n].y * (m - i - 1) - cu(yic, i + 2, m)) +
        ai[(i) % n].y * (cu(xic, i + 2, m) - ai[(i + 1) % n].x * (m - i - 1));
    intmod<1000000007> a2 =
        ccu(m, i + n - 3) + cu(cpic, i + 1, m - 1) * (i + n - m - 2) +
        ai[(i) % n].x *
            (ai[(i + 1) % n].y * (i + n - m - 2) - cu(yic, m + 1, i + n - 2)) +
        ai[(i) % n].y *
            (cu(xic, m + 1, i + n - 2) - ai[(i + 1) % n].x * (i + n - m - 2));
    amin += a1;
    amaj += a2;
    nmin += m - i - 1;
    nmaj += i + n - m - 2;
  }
  intmod<1000000007> an = (nmin - nmaj) * tai + (amaj - amin) * 2;
  cout << an / 2;
  return 0;
}
