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

public class Solution {

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st;
	
	String nextToken() throws Exception {
		while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	
	int nextInt() throws Exception {
		return Integer.parseInt(nextToken());
	}
	
	long nextLong() throws Exception {
		return Long.parseLong(nextToken());
	}
	
	class Point {
		int x, y;
		Point(int q, int w) {
			x = q; y = w;
		}
	}
	
	class Vert {
		int sum;
		int b, e;
		Vert l, r;
		Vert(int q, int w) {
			b = q; e = w;
			sum = 0;
			l = r = null;
		}
		Vert(Vert q) {
			b = q.b; e = q.e;
			sum = q.sum;
			l = q.l; r = q.r;
		}
	}
	
	Vert buildtree(int b, int e) {
		Vert res = new Vert(b, e);
		if (b != e) {
			res.l = buildtree(b, (b + e) / 2);
			res.r = buildtree((b + e) / 2 + 1, e);
		}
		return res;
	}
	
	Vert addone(Vert q, int x) {
		Vert res = new Vert(q);
		if (q.b != q.e) {
			if (x <= q.l.e) res.l = addone(res.l, x); else res.r = addone(res.r, x); 
		}
		res.sum++;
		return res;
	}
	
	int minn(Vert r, int s) {
		if (r.b == r.e) {
			if (r.sum == s) return r.b; else return 200000;
		}
		if (r.l.sum >= s) return minn(r.l, s); else return minn(r.r, s - r.l.sum);
	}
	
	int maxx(Vert r, int s) {
		if (r.b == r.e) {
			if (r.sum == s) return r.b; else return -1;
		}
		if (r.r.sum >= s) return maxx(r.r, s); else return maxx(r.l, s - r.r.sum);
	}
	
	boolean nextperm(int[] b) {
		int j = 8;
		while (j > 0 && b[j] < b[j - 1]) j--;
		if (j == 0) return false;
		int q = -1;
		for (int i = j; i < 9; i++) {
			if (b[i] > b[j - 1] && (q == -1 || b[i] < b[q])) q = i;
		}
		int t = b[j - 1]; b[j - 1] = b[q]; b[q] = t;
		Arrays.sort(b, j, 9);
		return true;
	}
	
	void solve() throws Exception {
		int n = nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		Integer[] xx = new Integer[n];
		Integer[] yy = new Integer[n];
		for (int i = 0; i < n; i++) {
			x[i] = nextInt();
			y[i] = nextInt();
			xx[i] = x[i];
			yy[i] = y[i];
		}
		Arrays.sort(xx);
		Arrays.sort(yy);
		TreeMap<Integer, Integer> tmx = new TreeMap<Integer, Integer>();
		TreeMap<Integer, Integer> tmy = new TreeMap<Integer, Integer>();
		for (int i = 0; i < n; i++) {
			if (i == 0 || !xx[i].equals(xx[i - 1])) tmx.put(xx[i], i);
			if (i == 0 || !yy[i].equals(yy[i - 1])) tmy.put(yy[i], i);
		}
		for (int i = 0; i < n; i++) {
			x[i] = tmx.get(x[i]);
			y[i] = tmy.get(y[i]);
		}
		tmx = tmy = null;
		Point[] p = new Point[n + 1];
		for (int i = 0; i < n; i++) p[i + 1] = new Point(x[i], y[i]);
		Arrays.sort(p, 1, n + 1, new Comparator<Point>() {
			@Override
			public int compare(Point o1, Point o2) {
				if (o1.y == o2.y) return o1.x - o2.x;
				return o1.y - o2.y;
			}
		});
		Vert[] rt = new Vert[n + 1];
		rt[0] = buildtree(1, 1 << 17);
		for (int i = 1; i <= n; i++) rt[i] = addone(rt[i - 1], p[i].x);
		int[] a = new int[9];
		int[] b = new int[9];
		for (int i = 0; i < 9; i++) {
			a[i] = nextInt();
			b[i] = i;
		}
		do {
			int s1 = a[b[0]] + a[b[1]] + a[b[2]];
			if (p[s1].y == p[s1 + 1].y) continue;
			int s2 = s1 + a[b[3]] + a[b[4]] + a[b[5]];
			if (p[s2].y == p[s2 + 1].y) continue;
			int xs1min = Math.max(minn(rt[s1], a[b[0]]), minn(rt[s2], a[b[0]] + a[b[3]]));
			xs1min = Math.max(xs1min, minn(rt[n], a[b[0]] + a[b[3]] + a[b[6]]));
			int xs1max = Math.min(maxx(rt[s1], a[b[1]] + a[b[2]]), maxx(rt[s2], a[b[1]] + a[b[2]] + a[b[4]] + a[b[5]]));
			xs1max = Math.min(xs1max, maxx(rt[n], a[b[1]] + a[b[2]] + a[b[4]] + a[b[5]] + a[b[7]] + a[b[8]]));
			if (xs1min >= xs1max) continue;
			int xs2min = Math.max(minn(rt[s1], a[b[0]] + a[b[1]]), minn(rt[s2], a[b[0]] + a[b[1]] + a[b[3]] + a[b[4]]));
			xs2min = Math.max(xs2min, minn(rt[n], a[b[0]] + a[b[1]] + a[b[3]] + a[b[4]] + a[b[6]] + a[b[7]]));
			int xs2max = Math.min(maxx(rt[s1], a[b[2]]), maxx(rt[s2], a[b[2]] + a[b[5]]));
			xs2max = Math.min(xs2max, maxx(rt[n], a[b[2]] + a[b[5]] + a[b[8]]));
			if (xs2min >= xs2max) continue;
			double x1 = xx[xs1min] + 0.5;
			double x2 = xx[xs2min] + 0.5;
			out.printf("%.5f %.5f\n", x1, x2);
			double y1 = yy[p[s1].y] + 0.5;
			double y2 = yy[p[s2].y] + 0.5;
			out.printf("%.5f %.5f\n", y1, y2);
			return;
		} while (nextperm(b));
		out.println(-1);
	}
	
	void run() {
		try {
			Locale.setDefault(Locale.US);
			in = new BufferedReader(new InputStreamReader(System.in));
//			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter(System.out);
			solve();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		} finally {
			out.close();
		}
	}
	
	public static void main(String[] args) {
		new Solution().run();
	}

}