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

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 3;
const int M = 1e5 * 290 / 2;
struct point {
  int x, y;
} p[N];
int ax[N], ay[N], cnt[10], c[10], n, mx, my, sx[N], sy[N];
int T[N], id, ls[M], rs[M], sum[M];
void ins(int &u, int l, int r, int p) {
  if (!u) u = ++id;
  sum[u]++;
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (p <= mid)
    ins(ls[u], l, mid, p);
  else
    ins(rs[u], mid + 1, r, p);
}
int qry(int u, int l, int r, int ql, int qr) {
  if (!u) return 0;
  if (l == ql && r == qr) return sum[u];
  int mid = (l + r) >> 1;
  if (qr <= mid) return qry(ls[u], l, mid, ql, qr);
  if (ql > mid) return qry(rs[u], mid + 1, r, ql, qr);
  return qry(ls[u], l, mid, ql, mid) + qry(rs[u], mid + 1, r, mid + 1, qr);
}
void ins(int x, int y) {
  for (; x <= mx; x += x & (-x)) ins(T[x], 1, my, y);
}
int qry(int x, int y) {
  int ans = 0;
  for (; x >= 1; x &= x - 1) ans += qry(T[x], 1, my, 1, y);
  return ans;
}
bool solve() {
  int s1 = cnt[c[1]] + cnt[c[2]] + cnt[c[3]];
  int s2 = cnt[c[4]] + cnt[c[5]] + cnt[c[6]];
  int x1 = upper_bound(sx + 1, sx + mx + 1, s1) - sx - 1;
  if (sx[x1] != s1) return 0;
  int x2 = upper_bound(sx + 1, sx + mx + 1, s1 + s2) - sx - 1;
  if (sx[x2] != s1 + s2) return 0;
  s1 = cnt[c[3]] + cnt[c[6]] + cnt[c[9]];
  s2 = cnt[c[2]] + cnt[c[5]] + cnt[c[8]];
  int y1 = upper_bound(sy + 1, sy + my + 1, s1) - sy - 1;
  if (sy[y1] != s1) return 0;
  int y2 = upper_bound(sy + 1, sy + my + 1, s1 + s2) - sy - 1;
  if (sy[y2] != s1 + s2) return 0;
  if (qry(x1, y1) != cnt[c[3]]) return 0;
  if (qry(x1, y2) != cnt[c[3]] + cnt[c[2]]) return 0;
  if (qry(x2, y1) != cnt[c[3]] + cnt[c[6]]) return 0;
  if (qry(x2, y2) != cnt[c[3]] + cnt[c[2]] + cnt[c[6]] + cnt[c[5]]) return 0;
  printf("%.1f %.1f\n%.1f %.1f\n", 0.5 + ax[x1], 0.5 + ax[x2], 0.5 + ay[y1],
         0.5 + ay[y2]);
  return 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &p[i].x, &p[i].y);
    ax[i] = p[i].x;
    ay[i] = p[i].y;
  }
  for (int i = 1; i <= 9; i++) scanf("%d", cnt + i);
  sort(ax + 1, ax + n + 1);
  sort(ay + 1, ay + n + 1);
  mx = unique(ax + 1, ax + n + 1) - ax - 1;
  my = unique(ay + 1, ay + n + 1) - ay - 1;
  for (int i = 1; i <= n; i++) {
    p[i].x = lower_bound(ax + 1, ax + mx + 1, p[i].x) - ax;
    p[i].y = lower_bound(ay + 1, ay + my + 1, p[i].y) - ay;
    sx[p[i].x]++;
    sy[p[i].y]++;
    ins(p[i].x, p[i].y);
  }
  for (int i = 1; i <= mx; i++) sx[i] += sx[i - 1];
  for (int i = 1; i <= my; i++) sy[i] += sy[i - 1];
  for (int i = 1; i <= 9; i++) c[i] = i;
  do {
    if (solve()) return 0;
  } while (next_permutation(c + 1, c + 10));
  puts("-1");
  return 0;
}