Limak is a little polar bear. According to some old traditions, his bear family prepared a New Year cake. And Limak likes cakes.

As you may know, a New Year cake is a strictly convex polygon with n vertices.

Parents won't allow Limak to eat more than half of a cake because he would get sick. After some thinking they decided to cut a cake along one of n·(n - 3) / 2 diagonals. Then Limak will get a non-greater piece.

Limak understands rules but he won't be happy if the second piece happens to be much bigger. Limak's disappointment will be equal to the difference between pieces' areas, multiplied by two. It can be proved that it will be integer for the given constraints.

There are n·(n - 3) / 2 possible scenarios. Consider them all and find the sum of values of Limak's disappointment, modulo 109 + 7.

Input

The first line of the input contains a single integer n (4 ≤ n ≤ 500 000) — the number of vertices in the polygon denoting the cake.

Each of the next n lines contains two integers xi and yi (|xi|, |yi| ≤ 109) — coordinates of the i-th point.

It's guaranteed that all points are distinct, polygon is strictly convex and points are given in the clockwise order.

Output

Print the sum of values of Limak's disappointment over all possible scenarios modulo 109 + 7.

Examples

Input

5
2 4
2 7
5 7
5 4
3 -2


Output

90


Input

4
-1000000000 -5000000
0 1234567
1 1
-5 -100000000


Output

525185196


Input

8
-10 0
-6 6
0 10
6 6
10 0
6 -6
0 -10
-6 -6


Output

5216

Note

In the first sample possible values of Limak's disappointment are 0, 18, 18, 24, 30.
#include <bits/stdc++.h>
using LL = long long;
const int MOD = (int)1e9 + 7;
const int N = 500000 + 5;
int n;
struct Point {
  LL x, y;
  Point() {}
  Point(LL _x, LL _y) : x(_x), y(_y) {}
  Point operator-(const Point &rhs) const {
    return Point(x - rhs.x, y - rhs.y);
  }
  Point operator*(LL t) const { return Point(x * t, y * t); }
  Point operator+(const Point &rhs) const {
    return Point(x + rhs.x, y + rhs.y);
  }
};
LL det(const Point &a, const Point &b) { return a.x * b.y - a.y * b.x; }
LL det(const Point &a, const Point &b, const Point &c) {
  return det(b - a, c - a);
}
Point points[N + N];
int brute() {
  LL ret = 0;
  LL area = 0;
  for (int i = 0; i < n; ++i) {
    area += det(points[i], points[(i + 1) % n], points[0]);
  }
  for (int i = 0; i < n; ++i) {
    for (int j = i + 2; j < n; ++j) {
      if (i + n - j < 2) continue;
      LL a = 0;
      for (int k = i + 1; k < j; ++k) {
        a += det(points[i], points[k], points[k + 1]);
      }
      ret += std::abs(area - a - a);
      ret %= MOD;
    }
  }
  return (ret % MOD + MOD) % MOD;
}
int work() {
  std::copy(points, points + n, points + n);
  LL area = 0;
  for (int i = 0; i < n; ++i) {
    area += det(points[i], points[i + 1]);
  }
  LL a = 0, d = 0;
  Point b(0, 0), c(0, 0);
  LL now = 0;
  LL small = 0;
  int cnt = 0;
  for (int i = 0, j = 0; i < n; ++i) {
    for (; j < i + n; ++j) {
      LL tmp = det(points[j], points[j + 1], points[i]);
      if (1ull * now + tmp << 1 > area) break;
      now += tmp;
      a += det(points[j], points[j + 1]) % MOD * j;
      a %= MOD;
      b = b + points[j + 1] * j;
      b.x %= MOD;
      b.y %= MOD;
      c = c + points[j] * j;
      c.x %= MOD;
      c.y %= MOD;
      d += det(points[j], points[j + 1]);
      d %= MOD;
    }
    LL tmp = -(a + det(b, points[i]) % MOD + det(points[i], c) % MOD) +
             j * (d + det(points[j], points[i]) % MOD);
    tmp %= MOD;
    small += tmp;
    small %= MOD;
    a -= det(points[i], points[i + 1]) % MOD * i;
    a %= MOD;
    b = b - points[i + 1] * i;
    b.x %= MOD;
    b.y %= MOD;
    c = c - points[i] * i;
    c.x %= MOD;
    c.y %= MOD;
    d -= det(points[i], points[i + 1]);
    d %= MOD;
    if (now * 2 == area) cnt++;
    now -= det(points[i], points[i + 1], points[j]);
  }
  return ((n * 1ll * (n - 3) / 2 % MOD * (area % MOD) % MOD - small * 2 +
           (cnt / 2 * 1ll * (area % MOD)) % MOD) %
              MOD +
          MOD) %
         MOD;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    std::cin >> points[i].x >> points[i].y;
  }
  std::reverse(points, points + n);
  std::cout << work() << std::endl;
}
