Problem: A country called Flatland is an infinite two-dimensional plane. Flatland has n cities, each of them is a point on the plane.

Flatland is ruled by king Circle IV. Circle IV has 9 sons. He wants to give each of his sons part of Flatland to rule. For that, he wants to draw four distinct straight lines, such that two of them are parallel to the Ox axis, and two others are parallel to the Oy axis. At that, no straight line can go through any city. Thus, Flatland will be divided into 9 parts, and each son will be given exactly one of these parts. Circle IV thought a little, evaluated his sons' obedience and decided that the i-th son should get the part of Flatland that has exactly ai cities.

Help Circle find such four straight lines that if we divide Flatland into 9 parts by these lines, the resulting parts can be given to the sons so that son number i got the part of Flatland which contains ai cities.

Input

The first line contains integer n (9 ≤ n ≤ 105) — the number of cities in Flatland. Next n lines each contain two space-separated integers: xi, yi ( - 109 ≤ xi, yi ≤ 109) — the coordinates of the i-th city. No two cities are located at the same point. The last line contains nine space-separated integers: <image>.

Output

If there is no solution, print a single integer -1.

Otherwise, print in the first line two distinct real space-separated numbers: x1, x2 — the abscissas of the straight lines that are parallel to the Oy axis. And in the second line print two distinct real space-separated numbers: y1, y2 — the ordinates of the straight lines, parallel to the Ox. If there are multiple solutions, print any of them. 

When the answer is being checked, a city is considered to lie on a straight line, if the distance between the city and the line doesn't exceed 10 - 6. Two straight lines are considered the same if the distance between them doesn't exceed 10 - 6.

Examples

Input

9
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3
1 1 1 1 1 1 1 1 1


Output

1.5000000000 2.5000000000
1.5000000000 2.5000000000


Input

15
4 4
-1 -3
1 5
3 -4
-4 4
-1 1
3 -3
-4 -5
-3 3
3 2
4 1
-4 2
-2 -5
-3 4
-1 4
2 1 2 1 2 1 3 2 1


Output

-3.5000000000 2.0000000000
3.5000000000 -1.0000000000


Input

10
-2 10
6 0
-16 -6
-4 13
-4 -2
-17 -10
9 15
18 16
-5 2
10 -5
2 1 1 1 1 1 1 1 1


Output

-1

Note

The solution for the first sample test is shown below:

<image>

The solution for the second sample test is shown below:

<image>

There is no solution for the third sample test.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.Arrays;
import java.util.Comparator;

public class CF260E2 {
    private static Point[] px;
    private static Point[] py;

    private static FenwickTree[] trees;
    private static int size;

    private static class FenwickTree {
        int[] array; // 1-indexed array, In this array We save cumulative information to perform efficient range queries and updates

        public FenwickTree(int size) {
            array = new int[size + 1];
        }

        /**
         * Range Sum query from 1 to ind
         * ind is 1-indexed
         */
        public int rsq(int ind) {
            int sum = 0;
            while (ind > 0) {
                sum += array[ind];
                //Extracting the portion up to the first significant one of the binary representation of 'ind' and decrementing ind by that number
                ind -= ind & (-ind);
            }

            return sum;
        }

        /**
         * Range Sum Query from a to b.
         * Search for the sum from array index from a to b
         * a and b are 1-indexed
         */
        public int rsq(int a, int b) {
            return rsq(b) - rsq(a - 1);
        }

        /**
         * Update the array at ind and all the affected regions above ind.
         * ind is 1-indexed
         */
        public void update(int ind, int value) {
            while (ind < array.length) {
                array[ind] += value;
                //Extracting the portion up to the first significant one of the binary representation of 'ind' and incrementing ind by that number
                ind += ind & (-ind);
            }
        }

        public int size() {
            return array.length - 1;
        }
    }

    private static class Point implements Comparable<Point>{
        private final int x;
        private final int y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }


        @Override
        public int compareTo(Point o) {
            int d = this.y - o.y;
            if (d != 0) return d;
            return this.x - o.x;
        }
    }

    private static void swap(int[] a, int i, int j) {
        int t = a[i];
        a[i] = a[j];
        a[j] = t;
    }

    private static int cnt = 0;

    static boolean solvePermutations(int[] a, int element) {
        if (element == a.length - 1) {
            // got another permutation, now try it:
            return solve(a);
        } else for (int i = element; i < a.length; i++) {
            swap(a, i, element);
            if (solvePermutations(a, element + 1)) return true;
            swap(a, element, i);
        }
        return false;
    }

    private static boolean solve(int[] a) {
        int[] posX = new int[]{0,
                a[0] + a[1] + a[2],
                a[0] + a[1] + a[2] + a[3] + a[4] + a[5],
                px.length};

        int[] posY = new int[]{0,
                a[0] + a[3] + a[6],
                a[0] + a[3] + a[6] + a[1] + a[4] + a[7],
                py.length};

        if (px[posX[1] - 1].x == px[posX[1]].x) return false;
        if (px[posX[2] - 1].x == px[posX[2]].x) return false;

        for (int i = 0; i < 9; i++) {
            if (sum(posX[i/3], posX[i/3+1], posY[i%3], posY[i%3+1] - 1) != a[i]) return false;
        }

        System.out.println(String.format("%.8f %.8f", px[posX[1]].x - 0.5, px[posX[2]].x - 0.5));
        System.out.println(String.format("%.8f %.8f", py[posY[1]].y - 0.5, py[posY[2]].y - 0.5));
        return true;
    }

    private static int sum(int start, int end, int y1, int y2) {
        int sum = 0;
        if (size > 0 && (end - start) > size) {
            int fidx1 = start % size == 0 ? start / size : start / size + 1;
            int fidx2 = (end) / size;
            for (int i = start; i < fidx1 * size; i++)
                if (px[i].y >= py[y1].y && px[i].y <= py[y2].y) sum++;
            for (int i = fidx1; i < fidx2; i++)
                sum += trees[i].rsq(y1 + 1, y2 + 1);
            for (int i = fidx2 * size; i < end; i++)
                if (px[i].y >= py[y1].y && px[i].y <= py[y2].y) sum++;
            return sum;
        }

        for (int i = start; i < end; i++)
            if (px[i].y >= py[y1].y && px[i].y <= py[y2].y) sum++;
        return sum;
    }

    private static void buildFenwickTrees() {
        size = px.length / trees.length + 1;
        for (int i = 0; i < trees.length; i++) {
            trees[i] = new FenwickTree(py.length);
            for (int k = i * size; k < (i+1) * size && k < px.length; k++) {
                int posY = Arrays.binarySearch(py, px[k]);
                trees[i].update(posY + 1, 1);
            }
        }
    }

    private static int nextInt(StreamTokenizer st) throws Exception {
        st.nextToken();
        return (int) st.nval;
    }

    public static void main(String[] args) throws Exception {
        StreamTokenizer st = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        int n = nextInt(st);
        px = new Point[n];
        py = new Point[n];
        for (int i = 0; i < n; i++) {
            int x = nextInt(st);
            int y = nextInt(st);
            px[i] = new Point(x, y);
            py[i] = px[i];
        }
        int[] a = new int[9];
        for (int i = 0; i < 9; i++)
            a[i] = nextInt(st);

        Arrays.sort(a);

        Arrays.sort(px, Comparator.comparing((Point point) -> point.x).thenComparing((Point point) -> point.y));
        Arrays.sort(py);

        trees = new FenwickTree[n > 1000 ? 64 : 16];
        buildFenwickTrees();

        if (!solvePermutations(a, 0))
            System.out.println("-1");

//        System.out.println(cnt);
    }
}