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 max_n = 1e5 + 10;
const int INF = 1e9 + 5;
const int LOG = 19;
int n;
vector<int> gec;
vector<vector<int>> sec;
int xx[max_n], yy[max_n];
pair<int, int> vec[max_n];
bool mark[10];
int a[10];
int x1, x2, y_1, y2;
int seg[LOG][max_n];
void gen(int rem) {
  if (rem == 0) {
    sec.push_back(gec);
    return;
  }
  for (int i = 0; i < 9; i++) {
    if (mark[i]) continue;
    mark[i] = 1;
    gec.push_back(i);
    gen(rem - 1);
    mark[i] = 0;
    gec.pop_back();
  }
}
void input() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> vec[i].first >> vec[i].second;
    xx[i] = vec[i].first;
    yy[i] = vec[i].second;
  }
  for (int i = 0; i < 9; i++) cin >> a[i];
}
void init() {
  sort(xx, xx + n);
  sort(yy, yy + n);
  sort(vec, vec + n);
}
void build(int v, int b, int e, int d) {
  if (e - b == 1) {
    seg[d][b] = vec[b].second;
    return;
  }
  int mid = (b + e) / 2;
  build(v << 1, b, mid, d + 1);
  build(v << 1 ^ 1, mid, e, d + 1);
  merge(seg[d + 1] + b, seg[d + 1] + mid, seg[d + 1] + mid, seg[d + 1] + e,
        seg[d] + b);
}
int fx(int v) {
  v--;
  if (xx[v] == xx[v + 1]) return INF;
  return xx[v] + 1;
}
int fy(int v) {
  v--;
  if (yy[v] == yy[v + 1]) return INF;
  return yy[v] + 1;
}
int get(int v, int b, int e, int l, int r, int hi, int lo, int d) {
  if (l <= b && e <= r)
    return lower_bound(seg[d] + b, seg[d] + e, hi) -
           lower_bound(seg[d] + b, seg[d] + e, lo);
  if (r <= b || e <= l) return 0;
  int mid = (b + e) / 2;
  return get(v << 1, b, mid, l, r, hi, lo, d + 1) +
         get(v << 1 ^ 1, mid, e, l, r, hi, lo, d + 1);
}
int cnt(int ind) {
  int xx1 = lower_bound(xx, xx + n, x1) - xx;
  int xx2 = lower_bound(xx, xx + n, x2) - xx;
  if (ind == 0) return get(1, 0, n, 0, xx1, INF, y_1, 0);
  if (ind == 1) return get(1, 0, n, xx1, xx2, INF, y_1, 0);
  if (ind == 2) return get(1, 0, n, xx2, n, INF, y_1, 0);
  if (ind == 3) return get(1, 0, n, 0, xx1, y_1, y2, 0);
  if (ind == 4) return get(1, 0, n, xx1, xx2, y_1, y2, 0);
  if (ind == 5) return get(1, 0, n, xx2, n, y_1, y2, 0);
  if (ind == 6) return get(1, 0, n, 0, xx1, y2, -INF, 0);
  if (ind == 7) return get(1, 0, n, xx1, xx2, y2, -INF, 0);
  return get(1, 0, n, xx2, n, y2, -INF, 0);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(5);
  gen(9);
  input();
  init();
  build(1, 0, n, 0);
  bool fl = 0;
  for (auto q : sec) {
    x1 = fx(a[q[0]] + a[q[3]] + a[q[6]]);
    x2 = fx(a[q[0]] + a[q[3]] + a[q[6]] + a[q[1]] + a[q[4]] + a[q[7]]);
    y_1 = fy(a[q[8]] + a[q[7]] + a[q[6]] + a[q[3]] + a[q[4]] + a[q[5]]);
    y2 = fy(a[q[8]] + a[q[7]] + a[q[6]]);
    if (x1 == INF || x2 == INF || y_1 == INF || y2 == INF) continue;
    bool found = 1;
    for (int i = 0; i < 9; i++)
      if (cnt(i) != a[q[i]]) {
        found = 0;
        break;
      }
    if (found) {
      fl = 1;
      break;
    }
  }
  if (!fl) {
    cout << -1 << endl;
    return 0;
  }
  cout << 0.5 + x1 - 1 << " " << 0.5 + x2 - 1 << endl;
  cout << 0.5 + y_1 - 1 << " " << 0.5 + y2 - 1 << endl;
  return 0;
}