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 A[100010], B[100010], C[20], a[20], ha[200010], sumx[200010], sumy[200010],
    h;
int id(int x) { return lower_bound(ha + 1, ha + 1 + h, x) - ha; }
int cnt, root[200010];
struct Q {
  int L, R, sum;
} T[6000010];
void update(int &x, int l, int r, int k, int v) {
  T[++cnt] = T[x];
  x = cnt;
  if (l == r) {
    T[x].sum += v;
    return;
  }
  int mid = (l + r) / 2;
  if (k <= mid)
    update(T[x].L, l, mid, k, v);
  else
    update(T[x].R, mid + 1, r, k, v);
  T[x].sum = T[T[x].L].sum + T[T[x].R].sum;
}
int qsum(int x, int l, int r, int k) {
  if (l == r) return T[x].sum;
  int mid = (l + r) / 2;
  if (k <= mid)
    return qsum(T[x].L, l, mid, k);
  else
    return qsum(T[x].R, mid + 1, r, k) + T[T[x].L].sum;
}
vector<int> g[200010];
int x[5], y[5], sum[5][5];
int main() {
  int i, j, n;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &A[i], &B[i]);
    ha[++h] = A[i];
    ha[++h] = B[i];
  }
  sort(ha + 1, ha + 1 + h);
  h = unique(ha + 1, ha + 1 + h) - ha - 1;
  for (i = 1; i <= n; i++) {
    A[i] = id(A[i]);
    B[i] = id(B[i]);
    g[A[i]].push_back(B[i]);
    sumx[A[i]]++;
    sumy[B[i]]++;
  }
  T[0].L = T[0].R = T[0].sum = cnt = 0;
  for (i = 1; i <= h; i++) {
    sumx[i] += sumx[i - 1];
    sumy[i] += sumy[i - 1];
    root[i] = root[i - 1];
    for (j = 0; j < g[i].size(); j++) update(root[i], 1, h, g[i][j], 1);
  }
  for (i = 1; i <= 9; i++) {
    scanf("%d", &C[i]);
    a[i] = i;
  }
  int c, l, ans = 0;
  while (1) {
    x[1] =
        lower_bound(sumx + 1, sumx + 1 + h, C[a[1]] + C[a[4]] + C[a[7]]) - sumx;
    x[2] =
        lower_bound(sumx + 1, sumx + 1 + h,
                    C[a[1]] + C[a[4]] + C[a[7]] + C[a[2]] + C[a[5]] + C[a[8]]) -
        sumx;
    y[1] =
        lower_bound(sumy + 1, sumy + 1 + h, C[a[1]] + C[a[2]] + C[a[3]]) - sumy;
    y[2] =
        lower_bound(sumy + 1, sumy + 1 + h,
                    C[a[1]] + C[a[2]] + C[a[3]] + C[a[4]] + C[a[5]] + C[a[6]]) -
        sumy;
    y[3] = x[3] = h;
    for (i = 1; i <= 9; i++) {
      c = (i - 1) / 3 + 1;
      l = (i - 1) % 3 + 1;
      sum[c][l] = sum[c - 1][l] + sum[c][l - 1] - sum[c - 1][l - 1] + C[a[i]];
    }
    ans = 1;
    for (j = 1; j <= 3; j++)
      for (i = 1; i <= 3; i++)
        if (qsum(root[x[i]], 1, h, y[j]) != sum[j][i]) ans = 0;
    if (ans) break;
    if (next_permutation(a + 1, a + 10) == 0) break;
  }
  if (ans == 0)
    printf("-1\n");
  else
    printf("%.1f %.1f\n%.1f %.1f\n", ha[x[1]] + 0.5, ha[x[2]] + 0.5,
           ha[y[1]] + 0.5, ha[y[2]] + 0.5);
  return 0;
}