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, typename L>
bool smax(T &x, L y) {
  return x < y ? (x = y, true) : false;
}
template <typename T, typename L>
bool smin(T &x, L y) {
  return y < x ? (x = y, true) : false;
}
struct node {
  vector<int> vec;
};
bool get(int p1, int p2, int p3, int p4);
void compress();
void build(int id, int b, int e);
int query(int id, int b, int e, int l, int r, int val, int val2);
string perm = "123456789";
const int MAXN = 1e5 + 15;
node tree[MAXN << 2];
int a[10];
int n;
pair<int, int> p[MAXN];
int x[MAXN], y[MAXN];
vector<int> px, py;
int psx[MAXN], psy[MAXN];
vector<int> vv[MAXN];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  for (int i = 1; i < 10; i++) cin >> a[i];
  compress();
  for (int i = 0; i < n; i++) vv[x[i]].push_back(y[i]);
  for (int i = 0; i < n; i++) sort(vv[x[i]].begin(), vv[x[i]].end());
  for (int i = 0; i < n; i++) psx[x[i]] += 1, psy[y[i]] += 1;
  for (int i = 1; i < n; i++) psx[i] += psx[i - 1], psy[i] += psy[i - 1];
  build(1, 0, n);
  do {
    int cntu = 0, cntd = 0, cntl = 0, cntr = 0;
    cntd = a[perm[6] - '0'] + a[perm[7] - '0'] + a[perm[8] - '0'];
    cntl = a[perm[0] - '0'] + a[perm[3] - '0'] + a[perm[6] - '0'];
    cntu = cntd + a[perm[3] - '0'] + a[perm[4] - '0'] + a[perm[5] - '0'];
    cntr = cntl + a[perm[1] - '0'] + a[perm[4] - '0'] + a[perm[7] - '0'];
    int p1 = lower_bound(psx, psx + n, cntl) - psx;
    int p2 = lower_bound(psy, psy + n, cntd) - psy;
    int p3 = upper_bound(psy, psy + n, cntu) - psy;
    int p4 = upper_bound(psx, psx + n, cntr) - psx;
    if (get(p1, p2, p3, p4)) {
      double c1, c2, c3, c4;
      c1 = (px[p1] + px[p1 + 1]) / 2.0;
      c2 = (py[p2] + py[p2 + 1]) / 2.0;
      c3 = (py[p3] + py[p3 - 1]) / 2.0;
      c4 = (px[p4] + px[p4 - 1]) / 2.0;
      return cout << c1 << ' ' << c4 << '\n' << c2 << ' ' << c3 << '\n', false;
    }
  } while (next_permutation(perm.begin(), perm.end()));
  return cout << "-1\n", false;
}
void compress() {
  for (int i = 0; i < n; i++) {
    px.push_back(p[i].first);
    py.push_back(p[i].second);
    x[i] = p[i].first;
    y[i] = p[i].second;
  }
  sort(px.begin(), px.end());
  sort(py.begin(), py.end());
  px.resize(unique(px.begin(), px.end()) - px.begin());
  py.resize(unique(py.begin(), py.end()) - py.begin());
  for (int i = 0; i < n; i++) {
    x[i] = lower_bound(px.begin(), px.end(), x[i]) - px.begin();
    y[i] = lower_bound(py.begin(), py.end(), y[i]) - py.begin();
  }
}
void build(int id, int b, int e) {
  if (b == e - 1) {
    tree[id].vec = vv[b];
    return;
  }
  int mid = (b + e) >> 1;
  build(id << 1, b, mid);
  build(id << 1 | 1, mid, e);
  tree[id].vec.resize(tree[id << 1].vec.size() + tree[id << 1 | 1].vec.size());
  merge(tree[id << 1].vec.begin(), tree[id << 1].vec.end(),
        tree[id << 1 | 1].vec.begin(), tree[id << 1 | 1].vec.end(),
        tree[id].vec.begin());
}
int query(int id, int b, int e, int l, int r, int val, int val2) {
  if (b >= r || e <= l) return 0;
  if (b >= l && e <= r) {
    int p = lower_bound(tree[id].vec.begin(), tree[id].vec.end(), val) -
            tree[id].vec.begin();
    int p2 = lower_bound(tree[id].vec.begin(), tree[id].vec.end(), val2) -
             tree[id].vec.begin();
    return p2 - p;
  }
  int mid = (b + e) >> 1;
  return query(id << 1, b, mid, l, r, val, val2) +
         query(id << 1 | 1, mid, e, l, r, val, val2);
}
bool get(int p1, int p2, int p3, int p4) {
  int cntlu, cntld, cntru, cntrd;
  cntlu = query(1, 0, n, 0, p1 + 1, p3, n);
  cntld = query(1, 0, n, 0, p1 + 1, 0, p2 + 1);
  cntru = query(1, 0, n, p4, n, p3, n);
  cntrd = query(1, 0, n, p4, n, 0, p2 + 1);
  int b[10];
  int cntu, cntd, cntl, cntr;
  cntd = psy[p2];
  cntl = psx[p1];
  cntu = n - psy[p3 - 1];
  cntr = n - psx[p4 - 1];
  b[1] = cntlu, b[3] = cntru, b[2] = cntu - b[1] - b[3];
  b[7] = cntld, b[9] = cntrd, b[8] = cntd - b[7] - b[9];
  b[4] = cntl - b[1] - b[7], b[6] = cntr - b[3] - b[9],
  b[5] = n - b[1] - b[2] - b[3] - b[4] - b[6] - b[7] - b[8] - b[9];
  for (int i = 1; i < 10; i++)
    if (b[i] != a[perm[i - 1] - '0']) return false;
  return true;
}