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;
struct point {
  int x, y;
} a[100500];
int n;
int64_t det(int a, int b, int c, int d) {
  return (int64_t)a * d - (int64_t)b * c;
}
int gcd(int x, int y) {
  for (; y; swap(x %= y, y))
    ;
  return x;
}
int64_t F[200500];
int lgcd;
int64_t f(int i, int j) {
  lgcd = abs(gcd(a[j].x - a[i].x, a[j].y - a[i].y));
  return det(a[i].x, a[i].y, a[j].x, a[j].y) - lgcd;
}
double pw2[1024];
double prob(int k, int n) {
  if (n - k >= 1024 || k > n) return 0;
  double e = k < 1024 ? 1 / pw2[k] : 0;
  return (1 - e) / (pw2[n - k] - e * (1 + n + n * (n - 1) / 2));
}
int main() {
  pw2[0] = 1;
  for (int k(1), _B_k(1024); k < _B_k; ++k) pw2[k] = pw2[k - 1] * 2;
  scanf("%d", &n);
  for (int i(0), _B_i(n); i < _B_i; ++i) scanf("%d%d", &a[i].x, &a[i].y);
  a[n] = a[0];
  for (int j(0), _B_j(2 * n); j < _B_j; ++j) {
    int i = j < n ? j : j - n;
    F[j + 1] = F[j] + f(i, i + 1);
  }
  assert(F[n] % 2 == 0);
  double res = F[n] / 2 + 1;
  int m = min(n - 1, 100);
  for (int i(0), _B_i(n); i < _B_i; ++i) {
    for (int k(1), _B_k(m); k < _B_k; ++k) {
      int j = i + k;
      int64_t s = F[j] - F[i] + f(j < n ? j : j - n, i);
      assert(s % 2 == 0);
      s = s / 2 + lgcd;
      double pr = prob(n - 1 - k, n);
      res -= s * pr;
    }
  }
  printf("%.12lf\n", res);
  return 0;
}