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.
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 100;
vector<int> seg[(int)(1e6 + 100)];
void add(int first, int second, int xb = 0, int xe = MAXN, int ind = 1) {
  if (first < xb or first > xe) return;
  seg[ind].push_back(second);
  if (xb != xe) {
    add(first, second, xb, (xb + xe) / 2, ((ind)*2));
    add(first, second, (xb + xe) / 2 + 1, xe, ((((ind)*2)) + 1));
  }
}
int bs(vector<int> &vec, int beg, int end) {
  if (vec.size() == 0 or vec[vec.size() - 1] < beg or vec[0] > end) return 0;
  int d = lower_bound(vec.begin(), vec.end(), beg) - vec.begin();
  int u = upper_bound(vec.begin(), vec.end(), end) - vec.begin();
  return u - d;
}
int query(int x1, int x2, int y1, int y2, int xb = 0, int xe = MAXN,
          int ind = 1) {
  x1 = (((x1) > (xb)) ? (x1) : (xb)), x2 = (((x2) < (xe)) ? (x2) : (xe));
  if (x2 < x1) return 0;
  if (x1 == xb and x2 == xe) return bs(seg[ind], y1, y2);
  int ans = 0;
  if (xb != xe) {
    ans += query(x1, x2, y1, y2, xb, (xb + xe) / 2, ((ind)*2));
    ans += query(x1, x2, y1, y2, (xb + xe) / 2 + 1, xe, ((((ind)*2)) + 1));
  }
  return ans;
}
int xs[MAXN], ys[MAXN];
pair<int, int> pnt[MAXN];
bool ysort(pair<int, int> a, pair<int, int> b) { return a.second < b.second; }
map<int, int> xmap, ymap;
int revx[MAXN], revy[MAXN];
int n;
void make(int xs[MAXN], map<int, int> &xmap, int revx[MAXN]) {
  int last = 0;
  for (int i = 0; i < n; ++i)
    if (xmap.find(xs[i]) != xmap.end())
      xs[i] = xmap[xs[i]];
    else {
      xmap[xs[i]] = last;
      revx[last] = xs[i];
      xs[i] = last;
      last++;
    }
}
bool error;
inline int find(int fr[], int ind) {
  if (fr[ind - 1] == fr[ind]) error = true;
  return fr[ind - 1];
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", xs + i, ys + i);
    pnt[i].first = xs[i], pnt[i].second = ys[i];
  }
  sort(xs, xs + n);
  sort(ys, ys + n);
  make(xs, xmap, revx);
  make(ys, ymap, revy);
  sort(pnt, pnt + n, ysort);
  for (int i = 0; i < n; ++i) add(xmap[pnt[i].first], ymap[pnt[i].second]);
  int a[3][3];
  for (int i = 0; i < 9; ++i) scanf("%d", (&a[0][0]) + i);
  sort(&a[0][0], (&a[0][0]) + 9);
  do {
    error = false;
    int uy1 = a[2][0] + a[2][1] + a[2][2];
    int uy2 = uy1 + a[1][0] + a[1][1] + a[1][2];
    int ux1 = a[0][0] + a[1][0] + a[2][0];
    int ux2 = ux1 + a[0][1] + a[1][1] + a[2][1];
    int y1 = find(ys, uy1), y2 = find(ys, uy2), x1 = find(xs, ux1),
        x2 = find(xs, ux2);
    if (error) continue;
    if (query(0, x1, y2 + 1, MAXN) == a[0][0])
      if (query(x2 + 1, MAXN, y2 + 1, MAXN) == a[0][2])
        if (query(0, x1, 0, y1) == a[2][0])
          if (query(x2 + 1, MAXN, 0, y1) == a[2][2]) {
            cout << fixed << revx[x1] + 0.5 << " " << revx[x2] + 0.5 << endl;
            cout << fixed << revy[y1] + 0.5 << " " << revy[y2] + 0.5 << endl;
            return 0;
          }
  } while (next_permutation(&a[0][0], (&a[0][0]) + 9));
  cout << -1 << endl;
  return 0;
}
