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 N = 100010;
struct point {
  int x, y;
  bool operator<(const point a) const { return x == a.x ? y < a.y : x < a.x; }
} p[N];
int x[N], y[N], a[9], h[9], nn;
double ansx1, ansx2, ansy1, ansy2;
struct node {
  int l, r;
  vector<int> v;
} tree[N << 4];
void build(int l, int r, int x) {
  tree[x].l = l;
  tree[x].r = r;
  tree[x].v.clear();
  for (int i = l; i <= r; i++) tree[x].v.push_back(p[i].y);
  sort(tree[x].v.begin(), tree[x].v.end());
  if (l == r) return;
  int mid = (l + r) >> 1;
  build(l, mid, x << 1);
  build(mid + 1, r, x << 1 | 1);
}
int query(int l, int r, int w, int x) {
  if (tree[x].l == l && r == tree[x].r) {
    int m = tree[x].v.size();
    if (m == 0) return 0;
    if (tree[x].v[0] > w) return 0;
    if (tree[x].v.back() <= w) return m;
    return upper_bound(tree[x].v.begin(), tree[x].v.end(), w) -
           tree[x].v.begin();
  }
  int ls = x << 1, rs = ls | 1, mid = (tree[x].l + tree[x].r) >> 1;
  if (l > mid) return query(l, r, w, rs);
  if (r <= mid) return query(l, r, w, ls);
  return query(l, mid, w, ls) + query(mid + 1, r, w, rs);
}
bool ok() {
  int x1 = a[h[0]] + a[h[1]] + a[h[2]] - 1,
      x2 = a[h[3]] + a[h[4]] + a[h[5]] + x1,
      y1 = a[h[0]] + a[h[3]] + a[h[6]] - 1,
      y2 = a[h[4]] + a[h[1]] + a[h[7]] + y1;
  if (x1 + 1 >= nn || x[x1] == x[x1 + 1]) return 0;
  if (x2 + 1 >= nn || x[x2] == x[x2 + 1]) return 0;
  if (y1 + 1 >= nn || y[y1] == y[y1 + 1]) return 0;
  if (y2 + 1 >= nn || y[y2] == y[y2 + 1]) return 0;
  if (query(0, x1, y[y1], 1) != a[h[0]]) return 0;
  if (query(0, x1, y[y2], 1) != a[h[0]] + a[h[1]]) return 0;
  if (query(x1 + 1, x2, y[y1], 1) != a[h[3]]) return 0;
  if (query(x1 + 1, x2, y[y2], 1) != a[h[3]] + a[h[4]]) return 0;
  ansx1 = (x[x1] + x[x1 + 1]) / 2.0;
  ansx2 = (x[x2] + x[x2 + 1]) / 2.0;
  ansy1 = (y[y1] + y[y1 + 1]) / 2.0;
  ansy2 = (y[y2] + y[y2 + 1]) / 2.0;
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  nn = n;
  while (n--) {
    cin >> p[n].x >> p[n].y;
    x[n] = p[n].x;
    y[n] = p[n].y;
  }
  sort(x, x + nn);
  sort(y, y + nn);
  sort(p, p + nn);
  build(0, nn - 1, 1);
  for (int i = 0; i < 9; i++) cin >> a[i];
  for (int i = 0; i < 9; i++) h[i] = i;
  int m = 362880;
  while (m--) {
    if (ok()) {
      cout << ansx1 << ' ' << ansx2 << endl << ansy1 << ' ' << ansy2 << endl;
      return 0;
    }
    next_permutation(h, h + 9);
  }
  cout << -1 << endl;
  return 0;
}