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;
int n;
struct point {
  int x, y;
};
point ps[100005];
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
double mm[505];
void prepare() {
  mm[250] = 1;
  for (int i = 251; i < 500; i++) mm[i] = mm[i - 1] * 2;
  for (int i = 249; i >= 0; i--) mm[i] = mm[i + 1] / 2;
}
double mi(int x) { return mm[250 + x]; }
double dd;
void baoli() {
  int i, j, g;
  double p, s;
  double ans = 1;
  dd = mi(n) - 1 - n - (double)n * (n - 1) / 2;
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++)
      if (i != j) {
        p = 1;
        s = (double)ps[i].x * ps[j].y - (double)ps[i].y * ps[j].x;
        s /= 2;
        int k = j - i;
        if (k < 0) k += n;
        p = (double)(mi(n - k - 1) - 1) / dd;
        g = abs(gcd(ps[i].y - ps[j].y, ps[i].x - ps[j].x));
        ans = ans + (s - (double)g / 2) * p;
      }
  printf("%.10lf\n", ans);
}
void solve() {
  int i, j, k, g;
  double p, s;
  double ans = 1;
  for (i = 0; i < n; i++)
    for (k = 1; k < 100; k++) {
      j = (i + k) % n;
      s = (double)ps[i].x * ps[j].y - (double)ps[i].y * ps[j].x;
      s /= 2;
      p = mi(-k - 1);
      g = abs(gcd(ps[i].y - ps[j].y, ps[i].x - ps[j].x));
      ans = ans + (s - (double)g / 2) * p;
    }
  printf("%.10lf\n", ans);
}
int main() {
  prepare();
  scanf("%d", &n);
  int i;
  for (i = 0; i < n; i++) scanf("%d%d", &ps[i].x, &ps[i].y);
  if (n < 120)
    baoli();
  else
    solve();
  return 0;
}