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;
int N;
int x[110000], y[110000], ix[110000], iy[110000];
int M;
int tar[110000 * 4][9], cnt[110000 * 4][9], x1[110000 * 4], x2[110000 * 4],
    m_x1[110000 * 4], m_y2[110000 * 4];
int K, ny;
int qx[110000 * 20], qy[110000 * 20], id[110000 * 20], qid[110000 * 20],
    yy[110000 * 20];
int tree[110000 * 5];
bool cmp(int u, int v) {
  if (qx[u] != qx[v]) return qx[u] < qx[v];
  return qy[u] < qy[v];
}
bool cmpx(int u, int v) {
  if (x[u] != x[v]) return x[u] < x[v];
  return y[u] < y[v];
}
bool cmpy(int u, int v) {
  if (y[u] != y[v]) return y[u] < y[v];
  return x[u] < x[v];
}
void update(int u, int x) {
  while (u <= ny) {
    tree[u] += x;
    u += u & -u;
  }
}
int calc(int u) {
  int res = 0;
  while (u) {
    res += tree[u];
    u -= u & -u;
  }
  return res;
}
int main() {
  int i, j, t, u, a[10];
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%d%d", &x[i], &y[i]);
    x[i] *= 2;
    y[i] *= 2;
  }
  for (i = 0; i < 9; i++) scanf("%d", &a[i]);
  sort(a, a + 9);
  for (i = 0; i < N; i++) ix[i] = iy[i] = i;
  sort(ix, ix + N, cmpx);
  sort(iy, iy + N, cmpy);
  M = 0;
  do {
    for (i = 0; i < 9; i++) tar[M][i] = a[i];
    t = tar[M][0] + tar[M][3] + tar[M][6];
    if (t && t < N && x[ix[t - 1]] == x[ix[t]]) continue;
    if (t == 0)
      x1[M] = x[ix[0]] - 1;
    else if (t == N)
      x1[M] = x[ix[N - 1]] + 1;
    else
      x1[M] = x[ix[t - 1]] / 2 + x[ix[t]] / 2;
    t += tar[M][1] + tar[M][4] + tar[M][7];
    if (t && t < N && x[ix[t - 1]] == x[ix[t]]) continue;
    if (t == 0)
      x2[M] = x[ix[0]] - 1;
    else if (t == N)
      x2[M] = x[ix[N - 1]] + 1;
    else
      x2[M] = x[ix[t - 1]] / 2 + x[ix[t]] / 2;
    t = tar[M][0] + tar[M][1] + tar[M][2];
    if (t && t < N && y[iy[t - 1]] == y[iy[t]]) continue;
    if (t == 0)
      m_x1[M] = y[iy[0]] - 1;
    else if (t == N)
      m_x1[M] = y[iy[N - 1]] + 1;
    else
      m_x1[M] = y[iy[t - 1]] / 2 + y[iy[t]] / 2;
    t += tar[M][3] + tar[M][4] + tar[M][5];
    if (t && t < N && y[iy[t - 1]] == y[iy[t]]) continue;
    if (t == 0)
      m_y2[M] = y[iy[0]] - 1;
    else if (t == N)
      m_y2[M] = y[iy[N - 1]] + 1;
    else
      m_y2[M] = y[iy[t - 1]] / 2 + y[iy[t]] / 2;
    M++;
  } while (next_permutation(a, a + 9));
  for (i = K = 0; i < N; i++) {
    qx[K] = x[i];
    qy[K] = y[i];
    id[K] = K;
    qid[K] = -1;
    K++;
  }
  for (i = 0; i < M; i++) {
    qx[K] = x1[i];
    qy[K] = m_x1[i];
    qid[K] = i * 10;
    id[K] = K;
    K++;
    qx[K] = x2[i];
    qy[K] = m_x1[i];
    qid[K] = i * 10 + 1;
    id[K] = K;
    K++;
    qx[K] = x1[i];
    qy[K] = m_y2[i];
    qid[K] = i * 10 + 3;
    id[K] = K;
    K++;
    qx[K] = x2[i];
    qy[K] = m_y2[i];
    qid[K] = i * 10 + 4;
    id[K] = K;
    K++;
  }
  for (i = 0; i < K; i++) yy[i] = qy[i];
  sort(yy, yy + K);
  ny = unique(yy, yy + K) - yy;
  sort(id, id + K, cmp);
  for (i = 0; i < K; i++) {
    u = id[i];
    j = lower_bound(yy, yy + ny, qy[u]) - yy;
    if (qid[u] < 0)
      update(j + 1, 1);
    else
      cnt[qid[u] / 10][qid[u] % 10] = calc(j + 1);
  }
  for (i = 0; i < M; i++) {
    if (cnt[i][0] != tar[i][0]) continue;
    if (cnt[i][1] - cnt[i][0] != tar[i][1]) continue;
    if (cnt[i][3] - cnt[i][0] != tar[i][3]) continue;
    if (cnt[i][4] - cnt[i][1] - cnt[i][3] + cnt[i][0] != tar[i][4]) continue;
    break;
  }
  if (i < M) {
    printf("%lf %lf\n", x1[i] / 2.0, x2[i] / 2.0);
    printf("%lf %lf\n", m_x1[i] / 2.0, m_y2[i] / 2.0);
  } else
    puts("-1");
  return 0;
}