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 event {
  int x, y, t, ans;
} E[1451550];
struct point {
  int x, y;
} P[100050];
int M1[362900], M2[362900], M3[362900], M4[362900], cnt[362900];
int X[100050], Y[100050], sx[100050], sy[100050], c[100050];
int a[10], b[10];
bool vis[10];
int n, Tx, Ty, m, tot;
bool cmpx(point a, point b) { return a.x < b.x; }
bool cmpy(point a, point b) { return a.y < b.y; }
int find(int a[100050], int h, int t, int x) {
  int mid;
  if (h > t) return 0;
  mid = (h + t) / 2;
  if (a[mid] == x) return mid;
  if (a[mid] > x) return find(a, h, mid - 1, x);
  if (a[mid] < x) return find(a, mid + 1, t, x);
}
event e(int a, int b, int c, int d) {
  event E;
  E.x = a;
  E.y = b;
  E.t = c;
  E.ans = d;
  return E;
}
void dfs(int i) {
  int j, m1, m2, m3, m4;
  for (j = 1; j <= 9; j++)
    if (!vis[j]) {
      vis[j] = true;
      b[i] = j;
      if (i < 9)
        dfs(i + 1);
      else {
        m1 = find(sx, 1, Tx, a[b[1]] + a[b[2]] + a[b[3]]);
        m2 = find(sx, 1, Tx,
                  a[b[1]] + a[b[2]] + a[b[3]] + a[b[4]] + a[b[5]] + a[b[6]]);
        m3 = find(sy, 1, Ty, a[b[1]] + a[b[4]] + a[b[7]]);
        m4 = find(sy, 1, Ty,
                  a[b[1]] + a[b[4]] + a[b[7]] + a[b[2]] + a[b[5]] + a[b[8]]);
        if (m1 && m2 && m3 && m4) {
          m++;
          M1[m] = m1;
          M2[m] = m2;
          M3[m] = m3;
          M4[m] = m4;
          tot++;
          E[tot] = e(m1, m3, m, a[b[1]]);
          tot++;
          E[tot] = e(m1, m4, m, a[b[1]] + a[b[2]]);
          tot++;
          E[tot] = e(m2, m3, m, a[b[1]] + a[b[4]]);
          tot++;
          E[tot] = e(m2, m4, m, a[b[1]] + a[b[2]] + a[b[4]] + a[b[5]]);
        }
      }
      vis[j] = false;
    }
}
bool cmp(event a, event b) { return a.y < b.y; }
int lowbit(int x) { return x & (-x); }
void add(int i, int x) {
  while (i <= Tx) {
    c[i] += x;
    i += lowbit(i);
  }
}
int getsum(int i) {
  int ans;
  ans = 0;
  while (i > 0) {
    ans += c[i];
    i -= lowbit(i);
  }
  return ans;
}
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d%d", &P[i].x, &P[i].y);
  sort(P + 1, P + n + 1, cmpx);
  Tx = 0;
  for (i = 1; i <= n; i++) {
    if ((i == 1) || (P[i].x != X[Tx])) {
      Tx++;
      X[Tx] = P[i].x;
    }
    P[i].x = Tx;
  }
  sort(P + 1, P + n + 1, cmpy);
  Ty = 0;
  for (i = 1; i <= n; i++) {
    if ((i == 1) || (P[i].y != Y[Ty])) {
      Ty++;
      Y[Ty] = P[i].y;
    }
    P[i].y = Ty;
  }
  memset(sx, 0, sizeof(sx));
  memset(sy, 0, sizeof(sy));
  for (i = 1; i <= n; i++) {
    sx[P[i].x]++;
    sy[P[i].y]++;
  }
  for (i = 1; i <= n; i++) {
    sx[i] += sx[i - 1];
    sy[i] += sy[i - 1];
  }
  for (i = 1; i <= 9; i++) scanf("%d", &a[i]);
  memset(vis, false, sizeof(vis));
  dfs(1);
  sort(E + 1, E + tot + 1, cmp);
  memset(cnt, 0, sizeof(cnt));
  memset(c, 0, sizeof(c));
  j = 0;
  for (i = 1; i <= tot; i++) {
    while ((j < n) && (P[j + 1].y <= E[i].y)) {
      j++;
      add(P[j].x, 1);
    }
    if (getsum(E[i].x) == E[i].ans) {
      cnt[E[i].t]++;
      if (cnt[E[i].t] == 4) {
        printf("%.2lf %.2lf\n", double(X[M1[E[i].t]]) + 0.5,
               double(X[M2[E[i].t]]) + 0.5);
        printf("%.2lf %.2lf\n", double(Y[M3[E[i].t]]) + 0.5,
               double(Y[M4[E[i].t]]) + 0.5);
        return 0;
      }
    }
  }
  printf("-1\n");
  return 0;
}