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;
template <typename T>
inline void R(T &x) {
  char ch = getchar();
  x = 0;
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch <= '9' && ch >= '0'; ch = getchar()) x = x * 10 + ch - '0';
}
inline long long gcd(long long a, long long b) {
  if (b == 0) return a;
  for (long long c = a % b; c; a = b, b = c, c = a % b)
    ;
  return b;
}
const int N = 200005;
pair<int, int> a[N];
int n;
inline long double pow(long double a, int b) {
  long double ans = 1;
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a;
    a = a * a;
  }
  return ans;
}
inline int Abs(int x) { return x < 0 ? -x : x; }
long long query(pair<int, int> a, pair<int, int> b) {
  if (b.first == a.first)
    return a.second < b.second ? -((long long)b.second - a.second) : 0;
  else {
    long long dx = Abs(b.first - a.first), dy = Abs(b.second - a.second);
    long long g = gcd(dx, dy);
    if (b.first > a.first) {
      if (b.second == a.second)
        return dx * b.second;
      else
        return ((dx + 1) * ((long long)a.second + b.second + 1) - g - 1) / 2 -
               b.second;
    } else {
      if (b.second == a.second)
        return -dx * (b.second + 1);
      else
        return -(((dx + 1) * ((long long)a.second + b.second + 1) + g + 1) / 2 -
                 a.second - 1);
    }
  }
}
void solves() {
  long double tot = pow(2, n) - 1 - n - (long double)n * (n - 1) / 2, ans = 0;
  for (int d = 1; d < n - 1; ++d) {
    for (int i = 1; i <= n; ++i) {
      int j = (i + d - 1) % n + 1;
      ans += (pow(2, n - d - 1) - 1) / tot * query(a[i], a[j]);
    }
  }
  ans += 1;
  printf("%.15lf\n", (double)ans);
}
void solveb() {
  long double ans = 0;
  for (int d = 1; d < 50; ++d) {
    for (int i = 1; i <= n; ++i) {
      int j = (i + d - 1) % n + 1;
      ans += pow(0.5, d + 1) * query(a[i], a[j]);
    }
  }
  ans += 1;
  printf("%.15f\n", (double)ans);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &a[i].first, &a[i].second);
  int mi = 0;
  for (int i = 1; i <= n; ++i) {
    mi = min(mi, a[i].second);
  }
  for (int i = 1; i <= n; ++i) a[i].second -= mi;
  reverse(a + 1, a + n + 1);
  if (n <= 200)
    solves();
  else
    solveb();
  return 0;
}