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 Point {
  int x, y;
  friend bool operator<(const Point &a, const Point &b) { return a.x < b.x; }
} p[100010];
int l[15][4][100010], r[15][4][100010];
int n, a[15], px[100010], nx, py[100010], ny;
int row[100010][2], col[100010][2];
void read() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d %d", &p[i].x, &p[i].y);
    px[i] = p[i].x, py[i] = p[i].y;
  }
  sort(px + 1, px + n + 1), nx = unique(px + 1, px + n + 1) - px - 1;
  sort(py + 1, py + n + 1), ny = unique(py + 1, py + n + 1) - py - 1;
  for (int i = 1; i <= n; ++i) {
    p[i].x = lower_bound(px + 1, px + nx + 1, p[i].x) - px;
    p[i].y = lower_bound(py + 1, py + ny + 1, p[i].y) - py;
  }
  for (int i = 1; i <= 9; ++i) scanf("%d", a + i);
  sort(p + 1, p + n + 1);
  static int sum[100010];
  for (int i = 1; i <= n; ++i) ++sum[p[i].x];
  for (int i = 2; i <= nx; ++i) sum[i] += sum[i - 1];
  for (int i = 1; i <= nx; ++i) row[sum[i]][0] = i, row[n - sum[i - 1]][1] = i;
  memset(sum, 0, sizeof(sum));
  for (int i = 1; i <= n; ++i) ++sum[p[i].y];
  for (int i = 2; i <= ny; ++i) sum[i] += sum[i - 1];
  for (int i = 1; i <= ny; ++i) col[sum[i]][0] = i, col[n - sum[i - 1]][1] = i;
}
void Prepare() {
  static int sum[100010];
  for (int k = 1, tot1, tot2, tot3, tot4; k <= 9; ++k) {
    tot1 = 0, tot2 = 0, tot3 = 0, tot4 = 0;
    l[k][0][0] = r[k][0][0] = ny;
    l[k][1][0] = r[k][1][0] = 0;
    memset(sum, 0, sizeof(sum));
    for (int i = 1, j = 1; i <= nx; ++i) {
      int &l0 = l[k][0][i], &l1 = l[k][1][i];
      int &r0 = r[k][0][i], &r1 = r[k][1][i];
      l0 = l[k][0][i - 1], l1 = l[k][1][i - 1], r0 = r[k][0][i - 1],
      r1 = r[k][1][i - 1];
      while (p[j].x == i) {
        tot1 += p[j].y <= l0;
        tot2 += p[j].y <= r0;
        tot3 += p[j].y >= l1;
        tot4 += p[j].y >= r1;
        ++sum[p[j++].y];
      }
      while (tot1 >= a[k]) tot1 -= sum[l0--];
      while (tot2 > a[k]) tot2 -= sum[r0--];
      while (tot3 > a[k]) tot3 -= sum[l1++];
      while (tot4 >= a[k]) tot4 -= sum[r1++];
    }
    tot1 = 0, tot2 = 0, tot3 = 0, tot4 = 0;
    l[k][2][nx + 1] = r[k][2][nx + 1] = ny;
    l[k][3][nx + 1] = r[k][3][nx + 1] = 0;
    memset(sum, 0, sizeof(sum));
    for (int i = nx, j = n; i >= 1; --i) {
      int &l0 = l[k][2][i], &l1 = l[k][3][i];
      int &r0 = r[k][2][i], &r1 = r[k][3][i];
      l0 = l[k][2][i + 1], l1 = l[k][3][i + 1], r0 = r[k][2][i + 1],
      r1 = r[k][3][i + 1];
      while (p[j].x == i) {
        tot1 += p[j].y <= l0;
        tot2 += p[j].y <= r0;
        tot3 += p[j].y >= l1;
        tot4 += p[j].y >= r1;
        ++sum[p[j--].y];
      }
      while (tot1 >= a[k]) tot1 -= sum[l0--];
      while (tot2 > a[k]) tot2 -= sum[r0--];
      while (tot3 > a[k]) tot3 -= sum[l1++];
      while (tot4 >= a[k]) tot4 -= sum[r1++];
    }
  }
}
void DFS(int p) {
  static bool use[15];
  static int F[15], f[15];
  if (p > 9) {
    int a = row[F[1] + F[2] + F[3]][1], b = row[F[7] + F[8] + F[9]][0];
    int c = col[F[1] + F[4] + F[7]][0], d = col[F[3] + F[6] + F[9]][1];
    if (!a || !b || !c || !d) return;
    if (l[f[1]][2][a] >= c || r[f[1]][2][a] < c) return;
    if (l[f[3]][3][a] > d || r[f[3]][3][a] <= d) return;
    if (l[f[7]][0][b] >= c || r[f[7]][0][b] < c) return;
    if (l[f[9]][1][b] > d || r[f[9]][1][b] <= d) return;
    printf("%f %f\n", px[a] - 0.5, px[b] + 0.5);
    printf("%f %f\n", py[c] + 0.5, py[d] - 0.5);
    exit(0);
  }
  for (int i = 1; i <= 9; ++i)
    if (!use[i]) {
      use[i] = true, F[p] = a[i], f[p] = i;
      DFS(p + 1);
      use[i] = false;
    }
}
int main() {
  read();
  Prepare();
  DFS(1);
  printf("-1\n");
  return 0;
}