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>
class Chenchentree {
 public:
  long long int l[7002000], r[7002000], a[7002000];
  long long int n;
  long long int add(long long int o, long long int p, long long int s) {
    long long int m = ++n;
    a[m] = a[o] + 1;
    if (s != 1)
      if (p < (s >> 1))
        l[m] = add(l[o], p, s >> 1), r[m] = r[o];
      else
        l[m] = l[o], r[m] = add(r[o], p - (s >> 1), s >> 1);
    return m;
  }
  long long int kth(long long int L, long long int R, long long int k,
                    long long int s) {
    if (s == 1) return 0;
    if (k <= a[r[R]] - a[r[L]])
      return kth(r[L], r[R], k, s >> 1) + (s >> 1);
    else
      return kth(l[L], l[R], k - (a[r[R]] - a[r[L]]), s >> 1);
  }
} T;
long long int n;
long long int x[102020], y[102020];
void swap(long long int i, long long int j) {
  long long int t;
  t = x[i];
  x[i] = x[j];
  x[j] = t;
  t = y[i];
  y[i] = y[j];
  y[j] = t;
}
void qsort(long long int l, long long int r) {
  long long int i = l, j = r, mid = x[rand() % (r - l + 1) + l];
  while (i <= j) {
    for (; x[i] < mid; i++)
      ;
    for (; x[j] > mid; j--)
      ;
    if (i <= j) swap(i++, j--);
  }
  if (l < j) qsort(l, j);
  if (i < r) qsort(i, r);
}
long long int root[102020];
long long int a[10], A[10];
void gi(long long int &x) {
  char ch = getchar();
  int sgn = 1;
  x = 0;
  while (ch < '0' || ch > '9') sgn = (ch == '-' ? -sgn : sgn), ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
  x *= sgn;
}
void init() {
  long long int i;
  gi(n);
  for (i = 1; i <= n; i++) gi(x[i]), gi(y[i]);
  qsort(1, n);
  for (i = 1; i <= n; i++)
    root[i] =
        T.add(root[i - 1], y[i] + 1073741824ll, 1073741824ll + 1073741824ll);
  for (i = 1; i <= 9; i++) gi(A[i]);
}
long long int kth(long long int l, long long int r, long long int k) {
  return T.kth(root[l - 1], root[r], k, 1073741824ll + 1073741824ll) -
         1073741824ll;
}
long long int cross(long long int r1, long long int l1, long long int r2,
                    long long int l2, long long int r3, long long int l3,
                    double &x) {
  long long int l = l1, r = r1;
  if (l < l1) l = l1;
  if (l < l2) l = l2;
  if (l < l3) l = l3;
  if (r > r1) r = r1;
  if (r > r2) r = r2;
  if (r > r3) r = r3;
  if (l < r)
    return (x = (l + r) * 0.5), 1;
  else
    return 0;
}
void check() {
  long long int i;
  long long int l = a[1] + a[4] + a[7];
  long long int r = a[2] + a[5] + a[8] + l;
  if (x[l] == x[l + 1]) return;
  if (x[r] == x[r + 1]) return;
  long long int y1 = kth(1, l, a[1]), Y1 = kth(1, l, a[1] + 1);
  long long int y2 = kth(l + 1, r, a[2]), Y2 = kth(l + 1, r, a[2] + 1);
  long long int y3 = kth(r + 1, n, a[3]), Y3 = kth(r + 1, n, a[3] + 1);
  long long int y4 = kth(1, l, a[1] + a[4]), Y4 = kth(1, l, a[1] + a[4] + 1);
  long long int y5 = kth(l + 1, r, a[2] + a[5]),
                Y5 = kth(l + 1, r, a[2] + a[5] + 1);
  long long int y6 = kth(r + 1, n, a[3] + a[6]),
                Y6 = kth(r + 1, n, a[3] + a[6] + 1);
  double _x, _y;
  if (cross(y1, Y1, y2, Y2, y3, Y3, _x))
    if (cross(y4, Y4, y5, Y5, y6, Y6, _y)) {
      printf("%.10lf %.10lf\n", (x[l] + x[l + 1]) * 0.5,
             (x[r] + x[r + 1]) * 0.5);
      printf("%.10lf %.10lf\n", _y, _x);
      exit(0);
    }
}
long long int b[12], c[12];
void dfs(long long int i) {
  if (i == 10) {
    for (i = 1; i <= 9; i++) a[i] = A[b[i]];
    check();
    return;
  }
  for (b[i] = 1; b[i] <= 9; b[i]++)
    if (!c[b[i]]) {
      c[b[i]] = 1;
      dfs(i + 1);
      c[b[i]] = 0;
    }
}
int main() {
  init();
  dfs(1);
  printf("-1");
  return 0;
}