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;
class segment_tree {
 public:
  int dat[400010];
  void modify(int p, int l, int r, int pos) {
    dat[p]++;
    if (l == r) return;
    int mid = (l + r) >> 1;
    if (pos <= mid)
      modify((p << 1), l, mid, pos);
    else
      modify(((p << 1) | 1), mid + 1, r, pos);
  }
  int query(int p, int l, int r, int k) {
    if (l == r) return dat[p] == k ? l : -1;
    int mid = (l + r) >> 1;
    if (k <= dat[(p << 1)]) return query((p << 1), l, mid, k);
    return query(((p << 1) | 1), mid + 1, r, k - dat[(p << 1)]);
  }
  int query_sum(int p, int l, int r, int ql, int qr) {
    if (ql <= l && r <= qr) return dat[p];
    int mid = (l + r) >> 1, out = 0;
    if (ql <= mid) out += query_sum((p << 1), l, mid, ql, qr);
    if (qr > mid) out += query_sum(((p << 1) | 1), mid + 1, r, ql, qr);
    return out;
  }
} Tx, Ty, Ttmp;
pair<int, int> p[100010];
vector<int> pos[100010];
int lsx[100010], lsy[100010];
int n, a[9];
class Query {
 public:
  int l, r, val;
};
class way {
 public:
  int q[4];
  int na[9], tx1, tx2, ty1, ty2;
} w[362881];
Query buffer[1500000];
vector<int> Q[100010];
int wcnt = 0, qcnt = 0;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &p[i].first, &p[i].second);
    lsx[i] = p[i].first, lsy[i] = p[i].second;
  }
  sort(lsx + 1, lsx + n + 1);
  sort(lsy + 1, lsy + n + 1);
  int endx = unique(lsx + 1, lsx + n + 1) - lsx,
      endy = unique(lsy + 1, lsy + n + 1) - lsy;
  for (int i = 1; i <= n; i++) {
    p[i].first = lower_bound(lsx + 1, lsx + endx, p[i].first) - lsx;
    p[i].second = lower_bound(lsy + 1, lsy + endy, p[i].second) - lsy;
    Tx.modify(1, 1, endx, p[i].first);
    Ty.modify(1, 1, endy, p[i].second);
    pos[p[i].first].push_back(p[i].second);
  }
  for (int i = 0; i < 9; i++) scanf("%d", &a[i]);
  sort(a, a + 9);
  for (int T = 0; T < 362880; T++) {
    int tx1 = Tx.query(1, 1, endx, a[0] + a[1] + a[2]),
        tx2 = Tx.query(1, 1, endx, a[0] + a[1] + a[2] + a[3] + a[4] + a[5]);
    int ty1 = Ty.query(1, 1, endy, a[0] + a[3] + a[6]),
        ty2 = Ty.query(1, 1, endy, a[0] + a[3] + a[6] + a[1] + a[4] + a[7]);
    if (tx1 != -1 && tx2 != -1 && ty1 != -1 && ty2 != -1) {
      ++wcnt;
      w[wcnt].tx1 = tx1;
      w[wcnt].tx2 = tx2;
      w[wcnt].ty1 = ty1;
      w[wcnt].ty2 = ty2;
      buffer[++qcnt] = (Query){1, ty1, 0};
      Q[tx1].push_back(qcnt);
      w[wcnt].q[0] = qcnt;
      buffer[++qcnt] = (Query){ty1 + 1, ty2, 0};
      Q[tx1].push_back(qcnt);
      w[wcnt].q[1] = qcnt;
      buffer[++qcnt] = (Query){1, ty1, 0};
      Q[tx2].push_back(qcnt);
      w[wcnt].q[2] = qcnt;
      buffer[++qcnt] = (Query){ty1 + 1, ty2, 0};
      Q[tx2].push_back(qcnt);
      w[wcnt].q[3] = qcnt;
      for (int i = 0; i < 9; i++) w[wcnt].na[i] = a[i];
    }
    next_permutation(a, a + 9);
  }
  for (int i = 1; i <= endx; i++) {
    for (int x : pos[i]) Ttmp.modify(1, 1, endy, x);
    for (int x : Q[i])
      buffer[x].val = Ttmp.query_sum(1, 1, endy, buffer[x].l, buffer[x].r);
  }
  for (int i = 1; i <= wcnt; i++) {
    if (buffer[w[i].q[0]].val != w[i].na[0]) continue;
    if (buffer[w[i].q[1]].val != w[i].na[1]) continue;
    if (buffer[w[i].q[2]].val != w[i].na[0] + w[i].na[3]) continue;
    if (buffer[w[i].q[3]].val != w[i].na[1] + w[i].na[4]) continue;
    printf("%.1lf %.1lf\n%.1lf %.1lf\n", lsx[w[i].tx1] + 0.5,
           lsx[w[i].tx2] + 0.5, lsy[w[i].ty1] + 0.5, lsy[w[i].ty2] + 0.5);
    return 0;
  }
  puts("-1");
  return 0;
}