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 x[200000];
int y[200000];
double pow1(int x, int y) {
  int i;
  double ret;
  ret = 1;
  for (i = 30; i >= 0; i--) {
    ret *= ret;
    if (((1 << i) & y) != 0) ret *= x;
  }
  return ret;
}
long long s(long long x1, long long y1, long long x2, long long y2,
            long long x3, long long y3) {
  long long ret;
  ret = x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2;
  if (ret < 0) ret = -ret;
  return ret;
}
long long gcd(long long x, long long y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
long long calc(long long x1, long long y1, long long x2, long long y2) {
  long long tmp1, tmp2;
  tmp1 = x2 - x1;
  if (tmp1 < 0) tmp1 = -tmp1;
  tmp2 = y2 - y1;
  if (tmp2 < 0) tmp2 = -tmp2;
  return gcd(tmp1, tmp2);
}
int main() {
  long long tot, tot1, tmp1, tmp;
  double ans, all, now;
  int i, j, n;
  double prob;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &x[i], &y[i]);
    x[n + i] = x[i];
    y[n + i] = y[i];
  }
  tot = 0;
  for (i = 1; i + 1 < n; i++)
    tot += s(x[0], y[0], x[i], y[i], x[i + 1], y[i + 1]);
  tot += 2;
  for (i = 0; i < n; i++) tot -= calc(x[i], y[i], x[i + 1], y[i + 1]);
  tot /= 2;
  if (n <= 1000) {
    all = 1;
    for (i = 0; i < n; i++) all *= 2;
    all -= 1;
    all -= n;
    all -= n * (n - 1) / 2;
  }
  ans = tot;
  for (i = 0; i < n; i++) {
    if (n > 1000)
      prob = 1.0 / 4;
    else {
      now = pow1(2, n - 2) - 1;
      prob = now / all;
    }
    tot1 = 0;
    tmp1 = calc(x[i], y[i], x[i + 1], y[i + 1]);
    for (j = i + 2; j < i + n; j++) {
      if (n > 1000)
        prob *= 0.5;
      else {
        now = (now + 1) / 2 - 1;
        prob = now / all;
      }
      if (prob < 1e-15) break;
      tot1 += s(x[i], y[i], x[j - 1], y[j - 1], x[j], y[j]);
      tmp1 += calc(x[j - 1], y[j - 1], x[j], y[j]);
      tmp = tot1 + 2 - tmp1 - calc(x[i], y[i], x[j], y[j]);
      tmp /= 2;
      if (j + 1 != i + n) tmp += calc(x[i], y[i], x[j], y[j]) - 1;
      ans -= prob * tmp;
    }
  }
  printf("%.9lf\n", ans);
  return 0;
}