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 QUE {
  int x, u, d, id;
  QUE() {}
  QUE(int _x, int _u, int _d, int _id) : x(_x), u(_u), d(_d), id(_id) {}
};
const int maxn = 1e5 + 5, maxp = 362885;
int N, A[9], perm[9], Y[maxn], pn, qn, ans[maxp][4], f[maxn << 1];
bool fail[maxp];
pair<int, int> P[maxn], *X[maxn];
QUE query[maxp * 3];
inline bool cmpx(pair<int, int> *a, pair<int, int> *b) {
  return a->first < b->first;
}
inline bool operator<(const QUE &a, const QUE &b) { return a.x < b.x; }
void Ins(int l, int r, int q) {
  int now((((l) + (r)) | ((l) != (r)))), mid((l + r) >> 1);
  f[now]++;
  if (l == r) return;
  if (q <= mid)
    Ins(l, mid, q);
  else
    Ins(mid + 1, r, q);
}
int Find(int l, int r, int ql, int qr) {
  int now((((l) + (r)) | ((l) != (r)))), mid((l + r) >> 1);
  if (l == ql && r == qr) return f[now];
  if (qr <= mid) return Find(l, mid, ql, qr);
  if (ql > mid) return Find(mid + 1, r, ql, qr);
  return Find(l, mid, ql, mid) + Find(mid + 1, r, mid + 1, qr);
}
int Bottom(int l, int r, int q) {
  int mid((l + r) >> 1);
  if (l == r) return l;
  if (f[(((l) + (mid)) | ((l) != (mid)))] >= q) return Bottom(l, mid, q);
  return Bottom(mid + 1, r, q - f[(((l) + (mid)) | ((l) != (mid)))]);
}
int Top(int l, int r, int q) {
  int mid((l + r) >> 1);
  if (l == r) return l;
  if (f[(((mid + 1) + (r)) | ((mid + 1) != (r)))] >= q)
    return Top(mid + 1, r, q);
  return Top(l, mid, q - f[(((mid + 1) + (r)) | ((mid + 1) != (r)))]);
}
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d%d", &P[i].first, &P[i].second);
    X[i] = P + i, Y[i] = P[i].second;
  }
  sort(X, X + N, cmpx);
  sort(Y, Y + N);
  for (int i = 0; i < 9; i++) {
    scanf("%d", &A[i]);
    perm[i] = i;
  }
  do {
    int B[9];
    for (int i = 0; i < 9; i++) B[i] = A[perm[i]];
    query[qn++] = QUE(B[0] + B[3] + B[6], B[0], B[6], pn);
    query[qn++] = QUE(N - B[2] - B[5] - B[8], B[0] + B[1], B[6] + B[7], pn);
    query[qn++] = QUE(N, B[0] + B[1] + B[2], B[6] + B[7] + B[8], pn);
    ans[pn][0] = ans[pn][1] = -1, ans[pn][2] = 0x80000000,
    ans[pn][3] = 0x7fffffff;
    pn++;
  } while (next_permutation(perm, perm + 9));
  sort(query, query + qn);
  for (int i = 0, j = 0; i < qn; i++) {
    for (; j < query[i].x; j++)
      Ins(0, N - 1, lower_bound(Y, Y + N, X[j]->second) - Y);
    int id = query[i].id;
    if (j < N && X[j]->first == X[j - 1]->first) {
      fail[id] = true;
      continue;
    }
    if (!~ans[id][0])
      ans[id][0] = j - 1;
    else if (!~ans[id][1])
      ans[id][1] = j - 1;
    ans[id][2] = max(ans[id][2], Y[Bottom(0, N - 1, query[i].d)]);
    ans[id][3] = min(ans[id][3], Y[Top(0, N - 1, query[i].u)]);
  }
  memset(f, 0, sizeof f);
  for (int i = 0, j = 0; i < qn; i++) {
    for (; j < query[i].x; j++)
      Ins(0, N - 1, lower_bound(Y, Y + N, X[j]->second) - Y);
    int id = query[i].id;
    if (!fail[id] &&
        Find(0, N - 1, 0, lower_bound(Y, Y + N, ans[id][2]) - Y) != query[i].d)
      fail[id] = true;
    if (!fail[id] && Find(0, N - 1, lower_bound(Y, Y + N, ans[id][3]) - Y,
                          N - 1) != query[i].u)
      fail[id] = true;
  }
  for (int i = 0; i < pn; i++)
    if (!fail[i]) {
      printf("%.3f %.3f\n%.3f %.3f\n", X[ans[i][0]]->first + 0.3,
             X[ans[i][1]]->first + 0.6, ans[i][2] + 0.3, ans[i][3] - 0.3);
      return 0;
    }
  puts("-1");
  return 0;
}