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 = 370000;
struct P {
  int v[8], y1, y2, x1, x2, fy1, fy2;
} zt[N];
int a[9], at[9], x[N], y[N], k;
bool u[9];
void dfs(int x) {
  if (x == 9) {
    zt[k].v[0] = at[a[0]];
    zt[k].v[1] = at[a[0]] + at[a[3]];
    zt[k].v[2] = at[a[0]] + at[a[3]] + at[a[6]];
    zt[k].v[3] = at[a[0]] + at[a[1]];
    zt[k].v[4] = at[a[0]] + at[a[3]] + at[a[1]] + at[a[4]];
    zt[k].v[5] =
        at[a[0]] + at[a[3]] + at[a[6]] + at[a[1]] + at[a[4]] + at[a[7]];
    zt[k].v[6] = at[a[0]] + at[a[1]] + at[a[2]];
    zt[k].v[7] = zt[k].v[6] + at[a[3]] + at[a[4]] + at[a[5]];
    zt[k].y1 = zt[k].y2 = zt[k].x1 = -1;
    k++;
    return;
  }
  for (int i = 0; i < 9; i++) {
    if (!u[i]) {
      a[x] = i;
      u[i] = true;
      dfs(x + 1);
      u[i] = false;
    }
  }
}
bool cmp1(int x, int y) { return zt[x].v[6] < zt[y].v[6]; }
bool cmp2(int x, int y) { return zt[x].v[7] < zt[y].v[7]; }
bool cmp3(int xx, int yy) { return y[xx] < y[yy]; }
bool cmp4(int x, int y) { return zt[x].v[2] < zt[y].v[2]; }
bool cmp5(int x, int y) { return zt[x].v[5] < zt[y].v[5]; }
bool cmp6(int xx, int yy) { return x[xx] < x[yy]; }
int b[N], c[N], d[N], f[N], C[N];
int lowbit(int x) { return x & (-x); }
int getsum(int x) {
  int r = 0;
  while (x > 0) {
    r += C[x];
    x -= lowbit(x);
  }
  return r;
}
void up(int x) {
  while (x < N) {
    C[x]++;
    x += lowbit(x);
  }
}
int main() {
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d%d", x + i, y + i);
  for (i = 0; i < 9; i++) scanf("%d", at + i);
  k = 0;
  dfs(0);
  for (i = 0; i < n; i++) d[i] = i;
  for (i = 0; i < 362880; i++) b[i] = c[i] = i;
  sort(b, b + 362880, cmp1);
  sort(c, c + 362880, cmp2);
  sort(d, d + n, cmp3);
  int j = 0, h = 0;
  k = 1;
  for (i = 0; i < n; i++) {
    f[d[i]] = k;
    if (i == n - 1 || y[d[i]] != y[d[i + 1]]) {
      while (j < 362880 && zt[b[j]].v[6] <= i + 1) {
        if (zt[b[j]].v[6] == i + 1) zt[b[j]].y1 = y[d[i]];
        if (zt[b[j]].v[6] == i + 1) zt[b[j]].fy1 = k;
        j++;
      }
      while (h < 362880 && zt[c[h]].v[7] <= i + 1) {
        if (zt[c[h]].v[7] == i + 1) zt[c[h]].y2 = y[d[i]];
        if (zt[c[h]].v[7] == i + 1) zt[c[h]].fy2 = k;
        h++;
      }
      k++;
    }
  }
  sort(b, b + 362880, cmp4);
  sort(c, c + 362880, cmp5);
  sort(d, d + n, cmp6);
  j = 0, h = 0;
  int rt = -1;
  for (i = 0; i < n && rt == -1; i++) {
    up(f[d[i]]);
    if (i == n - 1 || x[d[i]] != x[d[i + 1]]) {
      while (j < 362880 && zt[b[j]].v[2] <= i + 1) {
        if (zt[b[j]].v[2] == i + 1) {
          if (zt[b[j]].y1 != -1 && zt[b[j]].y2 != -1) {
            if (getsum(zt[b[j]].fy1) == zt[b[j]].v[0] &&
                getsum(zt[b[j]].fy2) == zt[b[j]].v[1]) {
              zt[b[j]].x1 = x[d[i]];
            }
          }
        }
        j++;
      }
      while (h < 362880 && zt[c[h]].v[5] <= i + 1) {
        if (zt[c[h]].v[5] == i + 1) {
          if (zt[c[h]].x1 != -1) {
            if (getsum(zt[c[h]].fy1) == zt[c[h]].v[3] &&
                getsum(zt[c[h]].fy2) == zt[c[h]].v[4]) {
              zt[c[h]].x2 = x[d[i]];
              rt = c[h];
              break;
            }
          }
        }
        h++;
      }
    }
  }
  if (rt == -1)
    puts("-1");
  else
    printf("%.9lf %.9lf\n%.9lf %.9lf\n", 0.5 + zt[rt].x1, 0.5 + zt[rt].x2,
           0.5 + zt[rt].y1, 0.5 + zt[rt].y2);
  return 0;
}