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 inf = ~0U >> 1;
const long long INF = ~0ULL >> 1;
template <class T>
inline void read(T &n) {
  char c;
  for (c = getchar(); !(c >= '0' && c <= '9'); c = getchar())
    ;
  n = c - '0';
  for (c = getchar(); c >= '0' && c <= '9'; c = getchar()) n = n * 10 + c - '0';
}
int Pow(int base, int n, int mo) {
  if (n == 0) return 1;
  if (n == 1) return base % mo;
  int tmp = Pow(base, n >> 1, mo);
  tmp = (long long)tmp * tmp % mo;
  if (n & 1) tmp = (long long)tmp * base % mo;
  return tmp;
}
const int maxn = 120000;
int n, a[maxn], per[maxn];
struct po {
  int x, y;
} p[maxn];
int hx[maxn], hy[maxn], sx[maxn], sy[maxn], cntx, cnty;
vector<int> E[maxn];
struct node {
  node *ls, *rs;
  int s;
  node() {
    ls = rs = NULL;
    s = 0;
  }
} * rt[maxn];
node *insert(node *k, int L, int R, int target) {
  node *p = new node();
  if (k) *p = *k;
  if (L == R) {
    p->s++;
    return p;
  }
  int m = L + R >> 1;
  if (target <= m)
    p->ls = insert(p->ls, L, m, target);
  else
    p->rs = insert(p->rs, m + 1, R, target);
  p->s = 0;
  if (p->ls) p->s += p->ls->s;
  if (p->rs) p->s += p->rs->s;
  return p;
}
int query(node *p, int L, int R, int l, int r) {
  if (p == NULL) return 0;
  if (L == l && R == r) return p->s;
  int m = L + R >> 1;
  if (r <= m)
    return query(p->ls, L, m, l, r);
  else if (l > m)
    return query(p->rs, m + 1, R, l, r);
  else
    return query(p->ls, L, m, l, m) + query(p->rs, m + 1, R, m + 1, r);
}
int Query(int x, int y) { return query(rt[x], 1, cnty, 1, y); }
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); ++i) {
    scanf("%d%d", &p[i].x, &p[i].y);
    hx[++cntx] = p[i].x;
    hy[++cnty] = p[i].y;
  }
  sort(hx + 1, hx + cntx + 1);
  sort(hy + 1, hy + cnty + 1);
  cntx = unique(hx + 1, hx + cntx + 1) - hx - 1;
  cnty = unique(hy + 1, hy + cnty + 1) - hy - 1;
  for (int i = (1); i <= (n); ++i) {
    p[i].x = lower_bound(hx + 1, hx + cntx + 1, p[i].x) - hx;
    p[i].y = lower_bound(hy + 1, hy + cnty + 1, p[i].y) - hy;
    sx[p[i].x]++;
    sy[p[i].y]++;
    E[p[i].x].push_back(p[i].y);
  }
  rt[0] = new node();
  for (int i = (1); i <= (cntx); ++i) {
    rt[i] = rt[i - 1];
    for (int j = (0); j < (E[i].size()); ++j)
      rt[i] = insert(rt[i], 1, cnty, E[i][j]);
  }
  for (int i = (1); i <= (cntx); ++i) sx[i] += sx[i - 1];
  for (int i = (1); i <= (cnty); ++i) sy[i] += sy[i - 1];
  for (int i = (1); i <= (9); ++i) scanf("%d", &a[i]);
  for (int i = (1); i <= (9); ++i) per[i] = i;
  do {
    int x1 =
        lower_bound(sx + 1, sx + cntx + 1, a[per[1]] + a[per[2]] + a[per[3]]) -
        sx;
    int x2 = lower_bound(sx + 1, sx + cntx + 1,
                         a[per[1]] + a[per[2]] + a[per[3]] + a[per[4]] +
                             a[per[5]] + a[per[6]]) -
             sx;
    int y1 =
        lower_bound(sy + 1, sy + cnty + 1, a[per[1]] + a[per[4]] + a[per[7]]) -
        sy;
    int y2 = lower_bound(sy + 1, sy + cnty + 1,
                         a[per[1]] + a[per[4]] + a[per[7]] + a[per[2]] +
                             a[per[5]] + a[per[8]]) -
             sy;
    int flag = 1;
    flag &= sx[x1] == a[per[1]] + a[per[2]] + a[per[3]];
    flag &= sx[x2] == a[per[1]] + a[per[2]] + a[per[3]] + a[per[4]] +
                          a[per[5]] + a[per[6]];
    flag &= a[per[1]] + a[per[4]] + a[per[7]] == sy[y1];
    flag &=
        a[per[1]] + a[per[4]] + a[per[7]] + a[per[2]] + a[per[5]] + a[per[8]] ==
        sy[y2];
    flag &= Query(x1, y1) == a[per[1]];
    flag &= Query(x1, y2) == a[per[1]] + a[per[2]];
    flag &= Query(x2, y1) == a[per[1]] + a[per[4]];
    flag &= Query(x2, y2) == a[per[1]] + a[per[2]] + a[per[4]] + a[per[5]];
    if (flag) {
      printf("%.10lf %.10lf\n", hx[x1] + 0.5, hx[x2] + 0.5);
      printf("%.10lf %.10lf\n", hy[y1] + 0.5, hy[y2] + 0.5);
      return 0;
    }
  } while (next_permutation(per + 1, per + 10));
  puts("-1");
  return 0;
}