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;
long long det(int a, int b, int c, int d) { return 1ll * a * d - 1ll * b * c; }
int gcd(int a, int b) { return a == 0 ? b : gcd(b % a, a); }
pair<long long, int> f(int i, int j) {
  int lgcd = abs(gcd(a[j].x - a[i].x, a[i].y - a[j].y));
  long long d = det(a[i].x, a[i].y, a[j].x, a[j].y) - lgcd;
  return make_pair(d, 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));
}
long long F[200500];
int main() {
  pw2[0] = 1;
  for (int _n(1024), k(1); k < _n; k++) pw2[k] = pw2[k - 1] * 2;
  scanf("%d", &n);
  for (int _n(n), i(0); i < _n; i++) scanf("%d%d", &a[i].x, &a[i].y);
  a[n] = a[0];
  for (int _n(2 * n), j(0); j < _n; j++) {
    int i = j < n ? j : j - n;
    F[j + 1] = F[j] + f(i, i + 1).first;
  }
  assert(F[n] % 2 == 0);
  double res = F[n] / 2 + 1;
  int m = min(n - 1, 100);
  for (int _n(n), i(0); i < _n; i++) {
    for (int _n(m), k(1); k < _n; k++) {
      int j = i + k;
      auto val = f(j < n ? j : j - n, i);
      long long s = F[j] - F[i] + val.first;
      assert(s % 2 == 0);
      s = s / 2 + val.second;
      double pr = prob(n - 1 - k, n);
      res -= s * pr;
    }
  }
  printf("%.12lf\n", res);
  return 0;
}