Problem: Gerald got tired of playing board games with the usual six-sided die, and he bought a toy called Randomizer. It functions as follows.

A Randomizer has its own coordinate plane on which a strictly convex polygon is painted, the polygon is called a basic polygon. If you shake a Randomizer, it draws some nondegenerate (i.e. having a non-zero area) convex polygon with vertices at some vertices of the basic polygon. The result of the roll (more precisely, the result of the shaking) is considered to be the number of points with integer coordinates, which were strictly inside (the points on the border are not considered) the selected polygon. Now Gerald is wondering: what is the expected result of shaking the Randomizer?

During the shaking the Randomizer considers all the possible non-degenerate convex polygons with vertices at the vertices of the basic polygon. Let's assume that there are k versions of the polygons. Then the Randomizer chooses each of them with probability <image>.

Input

The first line of the input contains a single integer n (3 ≤ n ≤ 100 000) — the number of vertices of the basic polygon. 

Next n lines contain the coordinates of the vertices of the basic polygon. The i-th of these lines contain two integers xi and yi ( - 109 ≤ xi, yi ≤ 109) — the coordinates of the i-th vertex of the polygon. The vertices are given in the counter-clockwise order.

Output

Print the sought expected value with absolute or relative error at most 10 - 9.

Examples

Input

4
0 0
2 0
2 2
0 2


Output

0.2


Input

5
0 0
2 0
2 2
1 3
0 2


Output

0.8125

Note

A polygon is called strictly convex if it is convex and no its vertices lie on the same line.

Let's assume that a random variable takes values x1, ..., xn with probabilities p1, ..., pn, correspondingly. Then the expected value of this variable equals to <image>.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + c - '0';
    c = getchar();
  }
  return x * f;
}
int n;
long double emm, ans, pw2[2333];
struct Point {
  long long x, y;
  Point(long long _x = 0, long long _y = 0) { x = _x, y = _y; }
  inline long long operator%(const Point b) { return x * b.y - y * b.x; }
} p[100010];
vector<Point> qwq;
long long Abs(long long x) { return x >= 0 ? x : -x; }
inline long long _gcd(long long a, long long b) {
  if (b == 0) return Abs(a);
  return _gcd(b, a % b);
}
void check1(vector<Point> &p) {
  for (register int i = 0; i < n; ++i) {
    long long tot = 0, bord = 0;
    for (int j = 0; j < min(50, n - 1); ++j) {
      tot += p[(i + j) % n] % p[(i + j + 1) % n];
      bord += _gcd(p[(i + j) % n].x - p[(i + j + 1) % n].x,
                   p[(i + j) % n].y - p[(i + j + 1) % n].y);
      if (j > 0) {
        long long S = tot + p[(i + j + 1) % n] % p[i],
                  B = bord + _gcd(p[(i + j + 1) % n].x - p[i].x,
                                  p[(i + j + 1) % n].y - p[i].y);
        if (n <= 500)
          ans += (pw2[n - (j + 2)] - 1) / emm *
                 (((S + 2) - B) / 2 +
                  _gcd(p[(i + j + 1) % n].x - p[i].x,
                       p[(i + j + 1) % n].y - p[i].y) -
                  1);
        else
          ans += 1.0 / pw2[(j + 2)] *
                 (((S + 2) - B) / 2 +
                  _gcd(p[(i + j + 1) % n].x - p[i].x,
                       p[(i + j + 1) % n].y - p[i].y) -
                  1);
      }
    }
  }
  long long sumS = 0, sumB = 0;
  for (int i = 0; i < n; ++i) {
    sumS += p[i] % p[(i + 1) % n];
    sumB += _gcd(p[i % n].x - p[(i + 1) % n].x, p[i % n].y - p[(i + 1) % n].y);
  }
  ans = ((sumS + 2) - sumB) / 2 - ans;
}
int main() {
  n = read();
  if (n <= 500) {
    emm = pow(2.0L, n) - 1 - n - n * (n - 1) / 2;
  }
  pw2[0] = 1.0;
  for (int i = 1; i <= 1000; ++i) {
    pw2[i] = pw2[i - 1] * 2.0;
  }
  emm = pow(2.0L, n) - 1 - n - n * (n - 1) / 2;
  for (int i = 1; i <= n; ++i) {
    long long x = read(), y = read();
    qwq.push_back(Point(x, y));
  }
  check1(qwq);
  double tmp = ans;
  printf("%.10lf\n", tmp);
  return 0;
}