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 double eps = 1e-9;
const int inf = 0x3f3f3f3f;
const long long INF = (long long)4e18;
const int MOD = (int)1e9 + 7, BAS = 257, invBAS = 70038911;
inline int sign(double x) { return x < -eps ? -1 : x > eps; }
inline int clz(int x) { return __builtin_clz(x); }
inline int clz(long long x) { return __builtin_clzll(x); }
inline int lg2(int x) { return !x ? -1 : 31 - clz(x); }
inline int lg2(long long x) { return !x ? -1 : 63 - clz(x); }
const int M = 200000 + 10;
int ls[M * 23], rs[M * 23], rt[M], T[M * 23], ss[M], sz;
struct PERSIST {
  int sz;
  int init() {
    sz = 0;
    return alloc(0);
  }
  inline int alloc(int o) {
    ls[sz] = ls[o], rs[sz] = rs[o], T[sz] = T[o];
    return sz++;
  }
  void build(int o, int l, int r) {
    T[o] = 0;
    if (l == r) return;
    int mid = l + r >> 1;
    build(ls[o] = alloc(0), l, mid);
    build(rs[o] = alloc(0), mid + 1, r);
  }
  void ins(int o, int l, int r, int u, int x) {
    if (l == r) {
      T[u]++;
      return;
    }
    int mid = l + r >> 1;
    if (x <= mid)
      ins(ls[o], l, mid, ls[u] = alloc(ls[o]), x);
    else
      ins(rs[o], mid + 1, r, rs[u] = alloc(rs[o]), x);
    T[u] = T[ls[u]] + T[rs[u]];
  }
  int binsy(int o, int u, int l, int r, int pl, int &k) {
    if (l >= pl && k > T[u] - T[o]) {
      k -= T[u] - T[o];
      return -1;
    }
    if (l == r) return k == T[u] - T[o] ? l : -2;
    int mid = l + r >> 1, ret = -1;
    if (pl <= mid) ret = binsy(ls[o], ls[u], l, mid, pl, k);
    if (~ret) return ret;
    return binsy(rs[o], rs[u], mid + 1, r, pl, k);
  }
  int ask(int o, int u, int l, int r, int pl, int pr) {
    if (pl <= l && r <= pr) return T[u] - T[o];
    int mid = l + r >> 1, ret = 0;
    if (pl <= mid) ret += ask(ls[o], ls[u], l, mid, pl, pr);
    if (pr > mid) ret += ask(rs[o], rs[u], mid + 1, r, pl, pr);
    return ret;
  }
} sgt;
int n, b[10];
pair<int, int> a[M];
bool solve() {
  auto binsx = [&](int beg, int sum) {
    int ret = 0;
    for (int i = 18; i >= 0; i--) {
      ret += 1 << i;
      if (ret >= sz || T[rt[ret]] - T[rt[beg]] > sum) ret -= 1 << i;
    }
    if (T[rt[ret]] - T[rt[beg]] != sum) return -1;
    return ret;
  };
  int x[2];
  x[0] = binsx(0, b[0] + b[1] + b[2]);
  if (x[0] == -1) return false;
  x[1] = binsx(x[0], b[3] + b[4] + b[5]);
  if (x[1] == -1) return false;
  int y[2], tmp;
  y[0] = sgt.binsy(rt[0], rt[sz - 1], 0, sz - 1, 0, tmp = b[0] + b[3] + b[6]);
  if (y[0] < 0) return false;
  y[1] = sgt.binsy(rt[0], rt[sz - 1], 0, sz - 1, y[0] + 1,
                   tmp = b[1] + b[4] + b[7]);
  if (y[1] < 0) return false;
  if (sgt.ask(rt[0], rt[x[0]], 0, sz - 1, 0, y[0]) == b[0] &&
      sgt.ask(rt[0], rt[x[0]], 0, sz - 1, y[0] + 1, y[1]) == b[1] &&
      sgt.ask(rt[x[0]], rt[x[1]], 0, sz - 1, 0, y[0]) == b[3] &&
      sgt.ask(rt[x[0]], rt[x[1]], 0, sz - 1, y[0] + 1, y[1]) == b[4]) {
    printf("%.6f %.6f\n%.6f %.6f\n", ss[y[0]] + 0.5, ss[y[1]] + 0.5,
           ss[x[0]] + 0.5, ss[x[1]] + 0.5);
    return true;
  }
  return false;
}
int main() {
  while (~scanf("%d", &n)) {
    sz = 0;
    ss[sz++] = -inf;
    for (int i = 0; i < n; i++) {
      scanf("%d%d", &a[i].first, &a[i].second);
      ss[sz++] = a[i].first;
      ss[sz++] = a[i].second;
    }
    for (int i = 0; i < 9; i++) scanf("%d", b + i);
    sort(ss, ss + sz);
    sz = unique(ss, ss + sz) - ss;
    sort(a, a + n, [](pair<int, int> a, pair<int, int> b) {
      if (a.second == b.second) return a.first < b.first;
      return a.second < b.second;
    });
    auto get = [&](int x) { return lower_bound(ss, ss + sz, x) - ss; };
    sgt.build(rt[0] = sgt.init(), 0, sz - 1);
    for (int t = 0, i = 0; t + 1 < sz;) {
      if (i == n) {
        t++;
        rt[t] = rt[t - 1];
      }
      while (t + 1 < sz && ss[t + 1] <= a[i].second) {
        t++;
        rt[t] = rt[t - 1];
      }
      while (i < n && a[i].second == ss[t]) {
        int lst = rt[t];
        rt[t] = sgt.alloc(rt[t]);
        sgt.ins(lst, 0, sz - 1, rt[t], get(a[i].first));
        i++;
      }
    }
    sort(b, b + 9);
    bool flag = 0;
    int cnt = 0;
    do {
      flag = solve();
    } while (!flag && next_permutation(b, b + 9));
    if (!flag) puts("-1");
  }
  return 0;
}