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;
const int N = 1e5 + 19, oo = (1 << 30) - 1;
struct Point {
  int x, y, DDx;
} A[N];
int n, x;
int Dx[N], Dy[N], Sx[N], Sy[N], tx, ty;
int s[10], cnt[10];
int yl, yr, Ql, Qr, t, v;
map<int, int> Mx, My;
vector<int> V[N * 4];
inline int cmpx(Point A, Point B) { return A.x < B.x; }
inline int cmpy(Point A, Point B) { return A.y > B.y; }
inline int Query(int x, int L, int R) {
  if (Ql <= L && R <= Qr) {
    int hi = lower_bound(V[x].begin(), V[x].end(), yr) - V[x].begin();
    int lo = lower_bound(V[x].begin(), V[x].end(), yl) - V[x].begin();
    int _1 = V[x][0], _2 = V[x][1], _3 = V[x][2];
    return hi - lo;
  }
  int tmp = 0;
  if (Ql <= ((L + R) >> 1)) tmp += Query((x << 1), L, ((L + R) >> 1));
  if (Qr > ((L + R) >> 1)) tmp += Query((x << 1 | 1), ((L + R) >> 1) + 1, R);
  return tmp;
}
inline void Update(int x, int L, int R) {
  V[x].push_back(v);
  if (L == R) return;
  if (t <= ((L + R) >> 1))
    Update((x << 1), L, ((L + R) >> 1));
  else
    Update((x << 1 | 1), ((L + R) >> 1) + 1, R);
}
inline int Que(int L, int R) {
  Ql = L, Qr = R;
  return Query(1, 1, tx);
}
inline void Upd(int x, int y) {
  t = x, v = y;
  Update(1, 1, tx);
}
inline void check() {
  int X1 = s[1] + s[4] + s[7], X2 = X1 + s[2] + s[5] + s[8];
  if (!Mx[X1] || !Mx[X2]) return;
  X1 = Mx[X1], X2 = Mx[X2];
  int Y1 = s[1] + s[2] + s[3], Y2 = Y1 + s[4] + s[5] + s[6];
  if (!My[Y1] || !My[Y2]) return;
  Y1 = Dy[My[Y1]];
  Y2 = Dy[My[Y2]];
  yl = Y1;
  yr = oo;
  cnt[1] = Que(1, X1);
  cnt[2] = Que(X1 + 1, X2);
  yl = Y2;
  yr = Y1;
  cnt[4] = Que(1, X1);
  cnt[5] = Que(X1 + 1, X2);
  if (cnt[1] != s[1] || cnt[2] != s[2] || cnt[4] != s[4] || cnt[5] != s[5])
    return;
  printf("%.10lf %.10lf\n", Dx[X1] + 0.5, Dx[X2] + 0.5);
  printf("%.10lf %.10lf\n", Y1 - 0.5, Y2 - 0.5);
  exit(0);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &A[i].x, &A[i].y);
  sort(A + 1, A + n + 1, cmpx);
  for (int i = 1; i <= n; i++) {
    if (i == 1 || A[i].x != A[i - 1].x) tx++, Dx[tx] = A[i].x;
    Sx[tx]++;
    A[i].DDx = tx;
  }
  for (int i = 1; i <= n; i++) Sx[i] += Sx[i - 1], Mx[Sx[i]] = i;
  sort(A + 1, A + n + 1, cmpy);
  for (int i = 1; i <= n; i++) {
    if (i == 1 || A[i].y != A[i - 1].y) ty++, Dy[ty] = A[i].y;
    Sy[ty]++;
  }
  for (int i = 1; i <= n; i++) Sy[i] += Sy[i - 1], My[Sy[i]] = i;
  for (int i = n; i >= 1; i--) Upd(A[i].DDx, A[i].y);
  for (int i = 1; i <= 9; i++) scanf("%d", &s[i]);
  sort(s + 1, s + 10);
  do check();
  while (next_permutation(s + 1, s + 10));
  puts("-1");
}