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 = 100004, M = 400004;
struct rec {
  int x, y;
} a[N];
struct query {
  int p, k, x, y1, y2;
} q[M * 2];
int n, nx, ny, tx[N], ty[N], sx[N], sy[N], c[N];
int num[9], tot, s[9], p[M][9], px[M][2], py[M][2], ans[M][2][3];
bool b[9];
bool operator<(rec a, rec b) { return a.x < b.x; }
bool operator<(query a, query b) { return a.x < b.x; }
void check() {
  int i, x1 = s[0] + s[1] + s[2], x2 = x1 + s[3] + s[4] + s[5], l = 0, r = nx;
  while (l + 1 < r) {
    int m = (l + r) / 2;
    if (sx[m] >= x1)
      r = m;
    else
      l = m;
  }
  if (sx[r] != x1) return;
  x1 = r;
  l = 0;
  r = nx;
  while (l + 1 < r) {
    int m = (l + r) / 2;
    if (sx[m] >= x2)
      r = m;
    else
      l = m;
  }
  if (sx[r] != x2) return;
  x2 = r;
  int y1 = s[0] + s[3] + s[6], y2 = y1 + s[1] + s[4] + s[7];
  l = 0;
  r = ny;
  while (l + 1 < r) {
    int m = (l + r) / 2;
    if (sy[m] >= y1)
      r = m;
    else
      l = m;
  }
  if (sy[r] != y1) return;
  y1 = r;
  l = 0;
  r = ny;
  while (l + 1 < r) {
    int m = (l + r) / 2;
    if (sy[m] >= y2)
      r = m;
    else
      l = m;
  }
  if (sy[r] != y2) return;
  y2 = r;
  tot++;
  for (i = 0; i < 9; i++) p[tot][i] = s[i];
  q[tot * 2 - 1].p = q[tot * 2].p = tot;
  q[tot * 2 - 1].k = 0;
  q[tot * 2].k = 1;
  q[tot * 2 - 1].x = x1;
  q[tot * 2].x = x2;
  q[tot * 2 - 1].y1 = q[tot * 2].y1 = y1;
  q[tot * 2 - 1].y2 = q[tot * 2].y2 = y2;
  px[tot][0] = x1;
  px[tot][1] = x2;
  py[tot][0] = y1;
  py[tot][1] = y2;
}
void dfs(int x) {
  if (x == 9) {
    check();
    return;
  }
  for (int i = 0; i < 9; i++)
    if (!b[i]) {
      b[i] = true;
      s[x] = num[i];
      dfs(x + 1);
      b[i] = false;
    }
}
void update(int x) {
  while (x <= ny) c[x]++, x += (x & (-x));
}
int Q(int x) {
  int ret = 0;
  while (x) {
    ret += c[x];
    x -= (x & (-x));
  }
  return ret;
}
int main() {
  int i;
  scanf("%d", &n);
  sx[0] = sy[0] = 0;
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].x, &a[i].y);
    tx[i] = a[i].x;
    ty[i] = a[i].y;
    sx[i] = sy[i] = 0;
  }
  sort(tx + 1, tx + n + 1);
  nx = unique(tx + 1, tx + n + 1) - tx - 1;
  sort(ty + 1, ty + n + 1);
  ny = unique(ty + 1, ty + n + 1) - ty - 1;
  for (i = 1; i <= n; i++) {
    a[i].x = lower_bound(tx + 1, tx + nx + 1, a[i].x) - tx;
    a[i].y = lower_bound(ty + 1, ty + ny + 1, a[i].y) - ty;
    sx[a[i].x]++;
    sy[a[i].y]++;
  }
  for (i = 1; i <= nx; i++) sx[i] += sx[i - 1];
  for (i = 1; i <= ny; i++) sy[i] += sy[i - 1];
  for (i = 0; i < 9; i++) scanf("%d", &num[i]), b[i] = false;
  tot = 0;
  dfs(0);
  sort(a + 1, a + n + 1);
  sort(q + 1, q + 2 * tot + 1);
  for (i = 1; i <= ny; i++) c[i] = 0;
  int j = 1, k = 1;
  for (i = 1; i <= nx; i++) {
    while ((j <= n) && (a[j].x == i)) update(a[j].y), j++;
    while ((k <= 2 * tot) && (q[k].x == i)) {
      ans[q[k].p][q[k].k][0] = Q(q[k].y1);
      ans[q[k].p][q[k].k][1] = Q(q[k].y2);
      ans[q[k].p][q[k].k][2] = Q(ny) - ans[q[k].p][q[k].k][1];
      ans[q[k].p][q[k].k][1] -= ans[q[k].p][q[k].k][0];
      k++;
    }
  }
  int ret = 0;
  for (i = 1; i <= tot; i++) {
    bool flag = true;
    for (j = 0; j < 3; j++) {
      if (ans[i][0][j] != p[i][j]) flag = false;
      if (ans[i][1][j] - ans[i][0][j] != p[i][j + 3]) flag = false;
    }
    if (flag) {
      ret = i;
      break;
    }
  }
  if (ret) {
    printf("%.10lf %.10lf\n", (tx[px[ret][0]] + tx[px[ret][0] + 1]) / 2.0,
           (tx[px[ret][1]] + tx[px[ret][1] + 1]) / 2.0);
    printf("%.10lf %.10lf\n", (ty[py[ret][0]] + ty[py[ret][0] + 1]) / 2.0,
           (ty[py[ret][1]] + ty[py[ret][1] + 1]) / 2.0);
  } else
    printf("-1\n");
  return 0;
}