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 JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author I and Bee
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        int n;
        int[] x;
        int[] y;
        final int EPS = (int) 200;
        double[] pow2;
        double[] pow2Neg;

        {
            pow2Neg = new double[(int) (1e5 + 5)];
            pow2Neg[0] = 1;
            for (int i = 1; i < pow2Neg.length; i++) {
                pow2Neg[i] = pow2Neg[i - 1] / 2;
            }

            pow2 = new double[(int) (1e5 + 5)];
            pow2[0] = 1;
            for (int i = 1; i < pow2.length; i++) {
                pow2[i] = 2 * pow2[i - 1];
            }
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
        /**/
            n = in.readInt();
            x = new int[n];
            y = new int[n];
            IOUtils.readIntArrays(in, x, y);
        /**/

        /*/
        ExtendedRandom rnd = new ExtendedRandom(1242531534);
        n = (int) 1e5;
//        x = rnd.nextIntArray(n, 0, (int) 1e9);
//        y = rnd.nextIntArray(n, 0, (int) 1e9);
        x = new int[n];
        y = new int[n];
        long[] fib = IntegerUtils.generateFibonacci((long) 1e9);
        for (int i = 0; i < n; i++) {
            x[i] = (int) fib[rnd.nextInt(fib.length)];
            y[i] = (int) fib[rnd.nextInt(fib.length)];
        }
        /**/


            double sum012 = 1 + n + n * (n - 1.0) / 2;
            double total = Math.pow(2, n) - sum012;
            double edge = 0;
            double S = 0;

            if (n < 1e3) {
                for (int i = 0; i < n; i++) {
                    for (int j = i + 1; j < n; j++) {
                        if (j == i + EPS) {
                            int newJ = n - EPS;
                            j = Math.max(j, newJ);
                        }
                        int cnt0 = j - i + 1 - 2;
                        int cnt1 = n - 2 - cnt0;
                        double c0 = n < 1e3 ? (Math.pow(2, cnt0) - 1) / total : 1 / (pow2[n - cnt0] - sum012 / pow2[cnt0]);
                        double c1 = n < 1e3 ? (Math.pow(2, cnt1) - 1) / total : 1 / (pow2[n - cnt1] - sum012 / pow2[cnt1]);

                        long Y = y[i] + y[j];
                        int X = x[j] - x[i];
                        int gcd = IntegerUtils.gcd(X, y[j] - y[i]);

                        edge += gcd * (c0 + c1);
                        S += X * Y * (c0 - c1);
                    }
                }
            } else {
                for (int i = 0; i < n; i++) {
                    double p2 = 0.5 * 0.5;
                    for (int j = i + 1; j < i + EPS; ++j) {
                        int indJ = j;
                        if (n <= indJ) indJ -= n;

                        long Y = y[i] + y[indJ];
                        int X = x[indJ] - x[i];
                        int gcd = IntegerUtils.gcd(X, y[indJ] - y[i]);

                        edge += gcd * p2;
                        //S += X * Y * -p2;
                        S += ((long) x[i] * y[indJ] - (long) x[indJ] * y[i]) * p2;
                        p2 *= 0.5;
                        //
                    }
                }
            }
            S *= 0.5;

            double inside = S - edge / 2 + 1;
            out.printFormat("%.20f\n", inside);

            double ans = 4552924655387.2803000;
            double myA = 4552924629066.53400000000000000000;
            double err = Math.abs(ans - myA) / Math.max(ans, myA);
            System.err.printf("DDD: %g %s\n", err, err <= 1e-9);
        }

    }

    static class IOUtils {
        public static void readIntArrays(InputReader in, int[]... arrays) {
            for (int i = 0; i < arrays[0].length; i++) {
                for (int j = 0; j < arrays.length; j++)
                    arrays[j][i] = in.readInt();
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class IntegerUtils {
        public static int gcd(int a, int b) {
            a = Math.abs(a);
            b = Math.abs(b);
            while (b != 0) {
                int temp = a % b;
                a = b;
                b = temp;
            }
            return a;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void printFormat(String format, Object... objects) {
            writer.printf(format, objects);
        }

        public void close() {
            writer.close();
        }

    }
}