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.
import java.io.*;
import java.util.*;
import java.util.stream.Collectors;

import static java.lang.Integer.*;
import static java.nio.charset.StandardCharsets.UTF_8;

public class Main {

    public static void main(String[] args) throws IOException {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in, UTF_8));
             BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out, UTF_8))) {
            int n = parseUnsignedInt(in.readLine().trim());
            List<Point> points = new ArrayList<>();
            StringTokenizer tokens;
            for (int i = 0; i < n; i++) {
                tokens = new StringTokenizer(in.readLine());
                int x = parseInt(tokens.nextToken());
                int y = parseInt(tokens.nextToken());
                points.add(new Point(2 * x, 2 * y, true));
            }
            Point[] xs = points.toArray(new Point[0]);
            Point[] ys = points.toArray(new Point[0]);
            Arrays.sort(xs, (u, v) -> Integer.compare(u.x, v.x));
            Arrays.sort(ys, (u, v) -> Integer.compare(u.y, v.y));
            tokens = new StringTokenizer(in.readLine());
            int[] kingdoms = new int[9];
            for (int i = 0; i < 9; i++) {
                kingdoms[i] = parseUnsignedInt(tokens.nextToken());
            }
            List<int[]> permutations = generate(kingdoms);
            List<SolutionCandidate> candidates = new ArrayList<>();
            for (int[] perm : permutations) {
                SolutionCandidate solutionCandidate = addIntersections(points, xs, ys, perm);
                if (solutionCandidate != null) {
                    candidates.add(solutionCandidate);
                }
            }
            points = points.stream().distinct().collect(Collectors.toCollection(ArrayList::new));
            SolutionCandidate solution = null;
            if (!candidates.isEmpty()) {
                Collections.sort(points, (u, v) -> Integer.compare(u.y, v.y));
                for (int i = 0; i < points.size(); i++) {
                    points.get(i).yPos = i;
                }
                Collections.sort(points, (u, v) -> Integer.compare(u.x, v.x));
                SegmentTreeSum tree = new SegmentTreeSum(2000000);
                Map<Point, Integer> cnts = new HashMap<>();
                for (Point p : points) {
                    if (p.regular) {
                        tree.addValue(p.yPos, p.yPos + 1, 1);
                    } else {
                        cnts.put(p, (int) tree.getSum(0, p.yPos + 1));
                    }
                }
                for (SolutionCandidate c : candidates) {
                    boolean success = c.perm[6] + c.perm[7] == cnts.get(c.xlyu);
                    success &= c.perm[5] + c.perm[6] + c.perm[7] + c.perm[8] == cnts.get(c.xryu);
                    success &= c.perm[5] + c.perm[6] == cnts.get(c.xryl);
                    success &= c.perm[6] == cnts.get(c.xlyl);
                    if (success) {
                        solution = c;
                        break;
                    }
                }
            }
            if (solution != null) {
                out.write(String.format(Locale.US, "%.10f %.10f", (solution.xlyl.x + 1) / 2.0 - 0.5, (solution.xryl.x - 1) / 2.0 + 0.5));
                out.newLine();
                out.write(String.format(Locale.US, "%.10f %.10f", (solution.xlyl.y + 1) / 2.0 - 0.5, (solution.xlyu.y - 1) / 2.0 + 0.5));
                out.newLine();
            } else {
                out.write("-1");
                out.newLine();
            }
        }
    }

    private static SolutionCandidate addIntersections(List<Point> points, Point[] xs, Point[] ys, int[] perm) {
        int up = perm[0] + perm[1] + perm[2];
        int right = perm[2] + perm[3] + perm[4];
        int low = perm[4] + perm[5] + perm[6];
        int left = perm[6] + perm[7] + perm[0];
        int yu = findHorizontalUpperLine(up, ys);
        if (yu == MIN_VALUE) {
            return null;
        }
        int yl = findHorizontalLowerLine(low, ys);
        if (yl == MIN_VALUE) {
            return null;
        }
        int xl = findVerticalLeftLine(left, xs);
        if (xl == MIN_VALUE) {
            return null;
        }
        int xr = findVerticalRightLine(right, xs);
        if (xr == MIN_VALUE) {
            return null;
        }
        if (yu <= yl) {
            return null;
        }
        if (xr <= xl) {
            return null;
        }
        Point xlyu = new Point(xl, yu, false);
        Point xlyl = new Point(xl, yl, false);
        Point xryu = new Point(xr, yu, false);
        Point xryl = new Point(xr, yl, false);
        points.add(xlyu);
        points.add(xlyl);
        points.add(xryu);
        points.add(xryl);
        return new SolutionCandidate(perm, xlyu, xlyl, xryu, xryl);
    }

    private static int findHorizontalUpperLine(int cnt, Point[] points) {
        Point p = points[points.length - cnt - 1];
        if (p.y == points[points.length - cnt].y) {
            return MIN_VALUE;
        }
        return p.y + 1;
    }

    private static int findHorizontalLowerLine(int cnt, Point[] points) {
        Point p = points[cnt];
        if (p.y == points[cnt - 1].y) {
            return MIN_VALUE;
        }
        return p.y - 1;
    }

    private static int findVerticalRightLine(int cnt, Point[] points) {
        Point p = points[points.length - cnt - 1];
        if (p.x == points[points.length - cnt].x) {
            return MIN_VALUE;
        }
        return p.x + 1;
    }

    private static int findVerticalLeftLine(int cnt, Point[] points) {
        Point p = points[cnt];
        if (p.x == points[cnt - 1].x) {
            return MIN_VALUE;
        }
        return p.x - 1;
    }

    private static List<int[]> generate(int[] kingdoms) {
        List<int[]> list = new ArrayList<>();
        int[] current = new int[kingdoms.length];
        boolean[] used = new boolean[kingdoms.length];
        generate(kingdoms, list, current, used, 0);
        return list;
    }

    private static void generate(int[] kingdoms, List<int[]> list, int[] current, boolean[] used, int pos) {
        if (pos == kingdoms.length) {
            list.add(Arrays.copyOf(current, current.length));
            return;
        }
        for (int i = 0; i < kingdoms.length; i++) {
            if (used[i]) {
                continue;
            }
            current[pos] = kingdoms[i];
            used[i] = true;
            generate(kingdoms, list, current, used, pos + 1);
            used[i] = false;
        }
    }

    private static class Point {

        final int x;
        final int y;
        final boolean regular;
        int yPos;

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

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            Point point = (Point) o;

            return x == point.x && y == point.y && regular == point.regular;

        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            result = 31 * result + (regular ? 1 : 0);
            return result;
        }
    }

    private static class SolutionCandidate {

        final int[] perm;
        final Point xlyu;
        final Point xlyl;
        final Point xryu;
        final Point xryl;

        public SolutionCandidate(int[] perm, Point xlyu, Point xlyl, Point xryu, Point xryl) {
            this.perm = perm;
            this.xlyu = xlyu;
            this.xlyl = xlyl;
            this.xryu = xryu;
            this.xryl = xryl;
        }
    }

    private static class SegmentTreeSum {

        private final int size;
        private final long[] values;
        private final long[] sum;

        public SegmentTreeSum(int size) {
            if (size < 1) {
                throw new IllegalArgumentException("Input size should be positive value");
            }
            this.size = size;
            this.values = new long[size << 2];
            this.sum = new long[size << 2];
        }

        /**
         * Adds new value to all elements in [left, right) interval.
         *
         * @param left  left bound
         * @param right right bound
         * @param value value to add
         */
        public void addValue(int left, int right, long value) {
            if (left < 0 || right > size) {
                throw new IllegalArgumentException(
                        "Input left and round bounds should be between zero and segment tree size");
            }
            if (right <= left) {
                throw new IllegalArgumentException(
                        "Input right bound should be greater than left bound");
            }
            addValue(left, right, value, 0, 0, size);
        }

        /**
         * Finds a sum on interval [left, right).
         *
         * @param left  left bound
         * @param right right bound
         * @return the sum on interval
         */
        public long getSum(int left, int right) {
            if (left < 0 || right > size) {
                throw new IllegalArgumentException(
                        "Input left and round bounds should be between zero and segment tree size");
            }
            if (right <= left) {
                throw new IllegalArgumentException(
                        "Input right bound should be greater than left bound");
            }
            return getSum(left, right, 0, 0, size);
        }

        private void addValue(int left, int right, long value, int pos, int treeLeft, int treeRight) {
            sum[pos] += value * (right - left);
            if (left == treeLeft && right == treeRight) {
                values[pos] += value;
                return;
            }
            int treeMedian = (treeLeft + treeRight) >>> 1;
            if (right <= treeMedian) {
                addValue(left, right, value, 2 * pos + 1, treeLeft, treeMedian);
            } else if (left >= treeMedian) {
                addValue(left, right, value, 2 * pos + 2, treeMedian, treeRight);
            } else {
                addValue(left, treeMedian, value, 2 * pos + 1, treeLeft, treeMedian);
                addValue(treeMedian, right, value, 2 * pos + 2, treeMedian, treeRight);
            }
        }

        private long getSum(int left, int right, int pos, int treeLeft, int treeRight) {
            if (left == treeLeft && right == treeRight) {
                return sum[pos];
            }
            int treeMedian = (treeLeft + treeRight) >>> 1;
            if (right <= treeMedian) {
                return getSum(left, right, 2 * pos + 1, treeLeft, treeMedian) + (right - left) * values[pos];
            }
            if (left >= treeMedian) {
                return getSum(left, right, 2 * pos + 2, treeMedian, treeRight) + (right - left) * values[pos];
            }
            return getSum(left, treeMedian, 2 * pos + 1, treeLeft, treeMedian) +
                    getSum(treeMedian, right, 2 * pos + 2, treeMedian, treeRight) +
                    (right - left) * values[pos];
        }
    }
}
