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;
const bool DEBUG = false;
template <typename T>
bool readInteger(T& x) {
  char c, r = 0, n = 0;
  x = 0;
  for (;;) {
    c = getchar();
    if ((c < 0) && (!r))
      return (0);
    else if ((c == '-') && (!r))
      n = 1;
    else if ((c >= '0') && (c <= '9'))
      x = x * 10 + c - '0', r = 1;
    else if (r)
      break;
  }
  if (n) x = -x;
  return (1);
}
const int MOD = 1000000007;
template <typename T>
struct mypt {
  T x, y;
  mypt() {}
  mypt(const T& a, const T& b) : x(a), y(b) {}
  mypt operator+(const mypt& P) const { return {x + P.x, y + P.y}; }
  mypt operator-(const mypt& P) const { return {x - P.x, y - P.y}; }
  mypt operator*(const T& s) const { return {x * s, y * s}; }
  T operator*(const mypt& P) const { return x * P.x + y * P.y; }
  T operator^(const mypt& P) const { return x * P.y - y * P.x; }
  T dot(const mypt& P) const { return (*this) * P; }
  T cross(const mypt& P) const { return (*this) ^ P; }
  T norm2() const { return x * x + y * y; }
};
const int MX = 1.1e5;
int N;
mypt<long long> pts[MX];
double pow2[MX];
double ge3(long long x) { return pow2[x] - 1 - x - x * (x - 1) / 2; }
double ge2(long long x) { return pow2[x] - 1 - x; }
double ge1(long long x) { return pow2[x] - 1; }
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int findBoundary(int a, int b) {
  long long dx = abs(pts[a].x - pts[b].x);
  long long dy = abs(pts[a].y - pts[b].y);
  assert(dx || dy);
  if (dx > dy) swap(dx, dy);
  if (dx == 0) return dy;
  long long z = gcd(dx, dy);
  return z;
}
int main() {
  pow2[0] = 1;
  for (int i = (1); i < int(1000); i++) pow2[i] = pow2[i - 1] * 2;
  double Earea = 0;
  double Eboundary = 0;
  readInteger(N);
  for (int i = (0); i < int(N); i++) {
    readInteger(pts[i].x);
    readInteger(pts[i].y);
  }
  mypt<long long> translation = pts[0];
  for (int i = (0); i < int(N); i++) pts[i] = pts[i] - translation;
  double baseChance = (N > 400 ? 0.5 : (1 - ge3(N - 1) / ge3(N)));
  for (int i = (0); i < int(N); i++) {
    for (int lose = (1); lose < int(N); lose++) {
      int oth = N - 1 - lose;
      double x = (N > 400) ? (1.0 / pow2[lose + 1]) : (ge1(oth) / ge3(N));
      if (x < 1e-20) break;
      int p = (i - lose + N) % N;
      Earea += x * (pts[p] ^ pts[i]);
      Eboundary += x * findBoundary(i, p);
    }
  }
  Earea /= 2;
  printf("%.15f\n", Earea - Eboundary / 2 + 1);
}