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;
template <typename T>
inline void red(T &x) {
  x = 0;
  bool fg = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') fg = 1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (T)(ch ^ 48), ch = getchar();
  if (fg) x = -x;
}
const int N = 100010;
const int M = 362880;
int xx[N], yy[N], n, a[10], totx, toty;
int cx[N], cy[N];
pair<int, int> p[N];
bool can[M + 10];
struct ANS {
  int xx1, xx2, yy1, yy2;
} ans[M + 10];
struct pp {
  int op, x, y, id;
  pp() {}
  pp(int _op, int _x, int _y, int _id = 0) : op(_op), x(_x), y(_y), id(_id) {}
  bool operator<(const pp a) const {
    return (x == a.x) ? (op < a.op) : (x < a.x);
  }
} b[N + M * 4];
int tot;
struct trearr {
  int t[N];
  void add(int x, int v) {
    for (; x <= toty; x += x & -x) t[x] += v;
  }
  int sum(int x) {
    int r = 0;
    for (; x; x -= x & -x) r += t[x];
    return r;
  }
} t;
int main() {
  red(n);
  for (int i = 1; i <= n; i++) {
    red(p[i].first);
    red(p[i].second);
    xx[i] = p[i].first;
    yy[i] = p[i].second;
  }
  for (int i = 1; i <= 9; i++) red(a[i]);
  sort(xx + 1, xx + n + 1);
  sort(yy + 1, yy + n + 1);
  totx = unique(xx + 1, xx + n + 1) - xx - 1;
  toty = unique(yy + 1, yy + n + 1) - yy - 1;
  for (int i = 1; i <= n; i++) {
    p[i].first = lower_bound(xx + 1, xx + totx + 1, p[i].first) - xx;
    p[i].second = lower_bound(yy + 1, yy + toty + 1, p[i].second) - yy;
    cx[p[i].first]++;
    cy[p[i].second]++;
    b[++tot] = pp(0, p[i].first, p[i].second);
  }
  for (int i = 1; i <= totx; i++) cx[i] += cx[i - 1];
  for (int i = 1; i <= toty; i++) cy[i] += cy[i - 1];
  sort(a + 1, a + 10);
  for (int ts = 1; ts <= M; ts++) {
    if (ts != 1 && is_sorted(a + 1, a + 10)) break;
    int cx1 = a[1] + a[4] + a[7], cx2 = cx1 + a[2] + a[5] + a[8];
    int cy1 = a[7] + a[8] + a[9], cy2 = cy1 + a[4] + a[5] + a[6];
    int xx1 = lower_bound(cx + 1, cx + totx + 1, cx1) - cx,
        xx2 = lower_bound(cx + 1, cx + totx + 1, cx2) - cx;
    int yy1 = lower_bound(cy + 1, cy + toty + 1, cy1) - cy,
        yy2 = lower_bound(cy + 1, cy + toty + 1, cy2) - cy;
    if (xx1 > totx || xx2 > totx || yy1 > toty || yy2 > toty) goto e;
    if (cx[xx1] != cx1 || cx[xx2] != cx2 || cy[yy1] != cy1 || cy[yy2] != cy2)
      goto e;
    can[ts] = 1;
    ans[ts] = {xx[xx1], xx[xx2], yy[yy1], yy[yy2]};
    b[++tot] = pp(a[7] + a[4], xx1, yy2, ts);
    b[++tot] = pp(a[7] + a[8], xx2, yy1, ts);
    b[++tot] = pp(a[7] + a[4] + a[8] + a[5], xx2, yy2, ts);
    b[++tot] = pp(a[7], xx1, yy1, ts);
  e:
    next_permutation(a + 1, a + 10);
  }
  sort(b + 1, b + tot + 1);
  for (int i = 1; i <= tot; i++) {
    if (b[i].op == 0)
      t.add(b[i].y, 1);
    else {
      int tmp = t.sum(b[i].y);
      if (tmp != b[i].op) can[b[i].id] = 0;
    }
  }
  for (int ts = 1; ts <= M; ts++) {
    if (can[ts]) {
      printf("%lf %lf\n%lf %lf\n", 0.5 + ans[ts].xx1, 0.5 + ans[ts].xx2,
             0.5 + ans[ts].yy1, 0.5 + ans[ts].yy2);
      return 0;
    }
  }
  puts("-1");
  return 0;
}