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>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const int INF = 1000000009;
const int N = 100007;
int n, x[N], y[N], a[10];
vector<pair<int, int> > pt;
vector<int> xx, yy;
struct cand {
  int h1, h2, v1, v2;
  vector<int> a;
  bool ok;
  cand() { ok = true; }
};
vector<int> events[N];
vector<cand> cands;
void work(int a[10]) {
  cand now;
  int need = a[0] + a[3] + a[6];
  if (xx[need] == xx[need - 1]) {
    return;
  }
  now.v1 = need;
  need += a[1] + a[4] + a[7];
  if (xx[need] == xx[need - 1]) {
    return;
  }
  now.v2 = need;
  need = a[6] + a[7] + a[8];
  if (yy[need] == yy[need - 1]) {
    return;
  }
  now.h1 = need;
  need += a[3] + a[4] + a[5];
  if (yy[need] == yy[need - 1]) {
    return;
  }
  now.h2 = need;
  now.a = vector<int>(a, a + 9);
  events[now.v1].push_back((int)(cands).size());
  events[now.v2].push_back((int)(cands).size());
  cands.push_back(now);
}
int T[N];
void update(int pos) {
  ++pos;
  for (; pos < N; pos += (pos & -pos)) {
    T[pos]++;
  }
}
int query(int pos) {
  ++pos;
  int ret = 0;
  for (; pos; pos -= (pos & -pos)) {
    ret += T[pos];
  }
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &x[i], &y[i]);
    pt.push_back(make_pair(x[i], y[i]));
    xx.push_back(x[i]);
    yy.push_back(y[i]);
  }
  int p[10];
  for (int i = 0; i < 9; ++i) {
    scanf("%d", &a[i]);
    p[i] = i;
  }
  sort((pt).begin(), (pt).end());
  sort((xx).begin(), (xx).end());
  sort((yy).begin(), (yy).end());
  while (true) {
    int b[10];
    for (int i = 0; i < 9; ++i) {
      b[i] = a[p[i]];
    }
    work(b);
    if (!next_permutation(p, p + 9)) {
      break;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (events[i].empty()) {
      goto UPDATE;
    }
    for (int j = 0; j < (int)(events[i]).size(); ++j) {
      int ind = events[i][j];
      if (i == cands[ind].v1) {
        if (query(cands[ind].h1 - 1) != cands[ind].a[6] ||
            query(cands[ind].h2 - 1) != cands[ind].a[6] + cands[ind].a[3]) {
          cands[ind].ok = false;
        }
      } else {
        if (query(cands[ind].h1 - 1) != cands[ind].a[6] + cands[ind].a[7] ||
            query(cands[ind].h2 - 1) != cands[ind].a[6] + cands[ind].a[7] +
                                            cands[ind].a[3] + cands[ind].a[4]) {
          cands[ind].ok = false;
        }
      }
    }
  UPDATE:
    update(lower_bound((yy).begin(), (yy).end(), pt[i].second) - yy.begin());
  }
  int ind = -1;
  for (int i = 0; i < (int)(cands).size(); ++i) {
    if (cands[i].ok) {
      ind = i;
    }
  }
  if (ind == -1) {
    puts("-1");
  } else {
    printf("%.9lf %.9lf\n%.9lf %.9lf\n", xx[cands[ind].v1] - 0.5,
           xx[cands[ind].v2] - 0.5, yy[cands[ind].h1] - 0.5,
           yy[cands[ind].h2] - 0.5);
  }
  return 0;
}