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;
double POW[110000], base, area;
int n;
long long total = 0;
long long ABS(long long x) {
  if (x < 0)
    return -x;
  else
    return x;
}
struct P {
  double x, y;
  P(){};
  P(double _x, double _y) {
    x = _x;
    y = _y;
  }
  P operator-(P b) { return P(x - b.x, y - b.y); }
} p[110000], L, R, T;
inline int NXT(int x) { return (x + 1) % n; }
long long Gcd(long long a, long long b) { return b ? Gcd(b, a % b) : a; }
long long gcd(P a) { return Gcd(ABS((long long)a.x), ABS((long long)a.y)); }
double cross(P A, P B) { return A.x * B.y - B.x * A.y; }
double pick(double S, long long x) { return S + 1.0 - ((double)x * 0.5); }
double prob(int k) {
  return (n > 100) ? 1.0 / POW[k + 1] : ((POW[n - k - 1] - 1.0) / base);
}
int main() {
  scanf("%d", &n);
  POW[0] = 1.0;
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf", &p[i].x, &p[i].y);
    POW[i + 1] = POW[i] * 2.0;
  }
  base = POW[n] - 1 - n - 0.5 * n * (n - 1);
  R = p[n - 1] - p[0];
  total += gcd(R);
  R = p[1] - p[0];
  total += gcd(R);
  for (int i = 2; i < n; i++) {
    L = p[i] - p[0];
    area += cross(R, L) * 0.5;
    R = L;
    T = p[i] - p[i - 1];
    total += gcd(T);
  }
  double ans = 0.0;
  for (int i = 0; i < n; i++) {
    R = p[NXT(i)] - p[i];
    long long pcnt = gcd(R);
    double S = 0;
    int cur;
    for (int j = NXT(NXT(i)), k = 2; k <= 35 && NXT(j) != i; k++, j = NXT(j)) {
      if (NXT(j) == i) continue;
      L = p[j] - p[i];
      T = L - R;
      pcnt += (cur = gcd(L)) + gcd(T);
      S += cross(R, L) * 0.5;
      ans += (pick(S, pcnt) + cur - 1) * prob(k);
      R = L;
      pcnt -= cur;
    }
  }
  printf("%.10lf", pick(area, total) - ans);
  return 0;
}