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;
vector<pair<int, int> > pos;
struct node {
  vector<int> y;
  int left;
  int right;
};
vector<node> tree;
void init(int f, int t, int k) {
  if (f > t) return;
  if (k >= tree.size()) tree.resize(k + 1);
  tree[k].left = pos[f].first, tree[k].right = pos[t].first;
  for (int i = f; i <= t; ++i) tree[k].y.push_back(pos[i].second);
  sort(tree[k].y.begin(), tree[k].y.end());
  int m = (f + t) >> 1;
  if (f < t) {
    init(f, m, k << 1);
    init(m + 1, t, (k << 1) | 1);
  }
}
int que(int lev, int x, int yy) {
  if (lev >= tree.size()) return 0;
  if (x < tree[lev].left) return 0;
  if (tree[lev].y.size() == 0 || yy < tree[lev].y[0]) return 0;
  int r(0);
  if (x >= tree[lev].right)
    return (upper_bound((tree[lev].y).begin(), (tree[lev].y).end(), yy) -
            tree[lev].y.begin());
  else {
    r = que(lev << 1, x, yy);
    r += que((lev << 1) | 1, x, yy);
  }
  return r;
}
int main() {
  int n;
  cin >> n;
  pos.resize(n);
  vector<int> x, y;
  x.resize(n), y.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> pos[i].first >> pos[i].second;
    x[i] = pos[i].first;
    y[i] = pos[i].second;
  }
  vector<int> num(9);
  for (int i = 0; i < 9; ++i) cin >> num[i];
  sort(pos.begin(), pos.end());
  sort(x.begin(), x.end());
  sort(y.begin(), y.end());
  tree.resize(3 * n + 1);
  init(0, n - 1, 1);
  sort(num.begin(), num.end());
  for (;;) {
    int a = num[0] + num[3] + num[6] - 1;
    int b = a + num[1] + num[4] + num[7];
    int c = num[6] + num[7] + num[8] - 1;
    int d = c + num[3] + num[4] + num[5];
    if ((x[a] != x[a + 1]) && (x[b] != x[b + 1]) && (y[c] != y[c + 1]) &&
        (y[d] != y[d + 1])) {
      if (que(1, x[a], y[c]) == num[6] &&
          que(1, x[a], y[d]) == num[6] + num[3] &&
          que(1, x[b], y[c]) == num[6] + num[7] &&
          que(1, x[b], y[d]) == num[6] + num[7] + num[3] + num[4]) {
        printf("%f ", ((float)x[a] + x[a + 1]) / 2.0);
        printf("%f\n", ((float)x[b] + x[b + 1]) / 2.0);
        printf("%f ", ((float)y[c] + y[c + 1]) / 2.0);
        printf("%f", ((float)y[d] + y[d + 1]) / 2.0);
        return 0;
      }
    }
    if (!next_permutation(num.begin(), num.end())) break;
  }
  printf("-1");
  return 0;
}