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;
struct point {
  int x, y;
  bool operator<(const point &b) const { return x != b.x ? x < b.x : y < b.y; }
} pi[100000 + 5];
bool cmp2(point a, point b) { return a.y < b.y; }
bool cmp1(point a, point b) { return a.x == b.x ? cmp2(a, b) : a.x < b.x; }
int a[10], n, lx[100000 + 5], ly[100000 + 5], son[8000000 + 5][2], b[10],
    mx = 0, my = 0, cntx, cnty, root[100000 + 5], s[8000000 + 5], cnt = 0,
    hx[100000 + 5], hy[100000 + 5];
bool find_ans = 0;
int newnode(int rt) {
  int p = ++cnt;
  memcpy(son[p], son[rt], sizeof(son[p]));
  s[p] = s[rt];
  return p;
}
int insert(int rt, int x) {
  int l = 1, r = cnty, p = newnode(rt), tmp = p;
  s[p]++;
  while (l < r) {
    int mid = l + r >> 1;
    if (x <= mid)
      son[p][0] = newnode(son[rt][0]), p = son[p][0], rt = son[rt][0], r = mid;
    else
      son[p][1] = newnode(son[rt][1]), p = son[p][1], rt = son[rt][1],
      l = mid + 1;
    s[p]++;
  }
  return tmp;
}
void add(int p, int x) {
  int l = 1, r = cnty;
  s[p]++;
  while (l < r) {
    int mid = l + r >> 1;
    if (x <= mid) {
      son[p][0] = newnode(son[p][0]);
      p = son[p][0], r = mid;
    } else {
      son[p][1] = newnode(son[p][1]);
      p = son[p][1], l = mid + 1;
    }
    s[p]++;
  }
}
int query(int ll, int rr, int x) {
  int l = 1, r = cnty, ans = 0;
  if (x == 0) return 0;
  while (l < r) {
    int mid = l + r >> 1;
    if (x <= mid)
      ll = son[ll][0], rr = son[rr][0], r = mid;
    else
      ans += s[son[rr][0]] - s[son[ll][0]], ll = son[ll][1], rr = son[rr][1],
                                            l = mid + 1;
  }
  return ans + s[rr] - s[ll];
}
int ask(int ll, int rr, int l, int r) {
  int ans;
  ans = query(root[ll - 1], root[rr], r) - query(root[ll - 1], root[rr], l - 1);
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &pi[i].x, &pi[i].y);
    hx[i] = pi[i].x, hy[i] = pi[i].y;
    mx = min(mx, pi[i].x), my = min(my, pi[i].y);
  }
  hx[n + 1] = mx - 1, hy[n + 1] = my - 1;
  sort(hx + 1, hx + 2 + n), sort(hy + 1, hy + 2 + n);
  cntx = unique(hx + 1, hx + 2 + n) - hx - 1,
  cnty = unique(hy + 1, hy + 2 + n) - hy - 1;
  for (int i = 1; i <= n; i++) {
    pi[i].x = lower_bound(hx + 1, hx + 1 + cntx, pi[i].x) - hx;
    pi[i].y = lower_bound(hy + 1, hy + 1 + cnty, pi[i].y) - hy;
  }
  sort(pi + 1, pi + 1 + n, cmp1);
  memset(root, 0, sizeof(root));
  int sum = 0, now = 1;
  while (now <= n) {
    int tmp = now;
    root[pi[now].x] = insert(root[pi[now].x - 1], pi[now].y);
    while (pi[now].x == pi[now + 1].x && now < n) {
      now++;
      add(root[pi[now].x], pi[now].y);
    }
    sum += now - tmp + 1;
    lx[sum] = pi[now].x;
    now++;
  }
  sort(pi + 1, pi + 1 + n, cmp2);
  now = 1, sum = 0;
  while (now <= n) {
    int tmp = now;
    while (pi[now].y == pi[now + 1].y && now < n) now++;
    sum += now - tmp + 1;
    ly[sum] = pi[now].y;
    now++;
  }
  for (int i = 1; i <= n; i++)
    if (!lx[i]) lx[i] = -1;
  for (int i = 1; i <= n; i++)
    if (!ly[i]) ly[i] = -1;
  for (int i = 1; i <= 9; i++) scanf("%d", a + i);
  int l, r, u, d;
  sort(a + 1, a + 10);
  do {
    l = a[1] + a[4] + a[7], r = a[3] + a[6] + a[9];
    if (lx[l] == -1) continue;
    if (lx[n - r] == -1) continue;
    l = lx[l], r = lx[n - r];
    u = a[7] + a[8] + a[9], d = a[1] + a[2] + a[3];
    if (ly[d] == -1) continue;
    if (ly[n - u] == -1) continue;
    d = ly[d], u = ly[n - u];
    if (ask(1, l, 1, d) != a[1]) continue;
    if (ask(l + 1, r, 1, d) != a[2]) continue;
    if (ask(r + 1, cntx, 1, d) != a[3]) continue;
    if (ask(1, l, d + 1, u) != a[4]) continue;
    if (ask(l + 1, r, d + 1, u) != a[5]) continue;
    if (ask(r + 1, cntx, d + 1, u) != a[6]) continue;
    if (ask(1, l, u + 1, cnty) != a[7]) continue;
    if (ask(l + 1, r, u + 1, cnty) != a[8]) continue;
    find_ans = 1;
    break;
  } while (next_permutation(a + 1, a + 10));
  if (find_ans)
    printf("%.6lf %.6lf %.6lf %.6lf\n", hx[l] + 0.5, hx[r] + 0.5, hy[d] + 0.5,
           hy[u] + 0.5);
  else
    puts("-1");
  return 0;
}