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 = 1e5 + 10;
int n, data[20][N], sumx[N], sumy[N], p[9], nine;
vector<int> allx, ally;
pair<int, int> a[N];
void build(int h, int st, int en) {
  if (en - st < 2) {
    data[h][st] = a[st].second;
    return;
  }
  int mid = (st + en) / 2;
  build(h + 1, st, mid);
  build(h + 1, mid, en);
  merge(data[h + 1] + st, data[h + 1] + mid, data[h + 1] + mid,
        data[h + 1] + en, data[h] + st);
}
int get(int h, int st, int en, int l, int r, int k) {
  if (en <= l or r <= st) return 0;
  if (l <= st and en <= r)
    return upper_bound(data[h] + st, data[h] + en, k) - (data[h] + st);
  int mid = (st + en) / 2;
  return get(h + 1, st, mid, l, r, k) + get(h + 1, mid, en, l, r, k);
}
void base() {
  int v1 = lower_bound(sumx, sumx + allx.size(), p[0] + p[3] + p[6]) - sumx;
  int v2 = lower_bound(sumx, sumx + allx.size(),
                       p[0] + p[3] + p[6] + p[1] + p[4] + p[7]) -
           sumx;
  int h1 = lower_bound(sumy, sumy + ally.size(),
                       p[3] + p[4] + p[5] + p[6] + p[7] + p[8]) -
           sumy;
  int h2 = lower_bound(sumy, sumy + ally.size(), p[6] + p[7] + p[8]) - sumy;
  if ((h1 == ally.size()) or (v2 == allx.size())) return;
  if ((sumx[v1] != (p[0] + p[3] + p[6])) or
      (sumx[v2] != (p[0] + p[3] + p[6] + p[1] + p[4] + p[7])) or
      (sumy[h2] != (p[6] + p[7] + p[8])) or
      (sumy[h1] != (p[3] + p[4] + p[5] + p[6] + p[7] + p[8])))
    return;
  int help1 = lower_bound(a, a + n, make_pair(allx[v1], (int)(1e9 + 10))) - a;
  int help2 = lower_bound(a, a + n, make_pair(allx[v2], (int)(1e9 + 10))) - a;
  if (get(0, 0, n, 0, help1, ally[h2]) != p[6]) return;
  if (get(0, 0, n, 0, help1, ally[h1]) != p[6] + p[3]) return;
  if (get(0, 0, n, help1, help2, ally[h2]) != p[7]) return;
  if (get(0, 0, n, help1, help2, ally[h1]) != p[7] + p[4]) return;
  cout << fixed << setprecision(2) << (double)allx[v1] + 0.1 << ' '
       << (double)allx[v2] + 0.1 << endl
       << (double)ally[h1] + 0.1 << ' ' << (double)ally[h2] + 0.1;
  exit(0);
}
int main() {
  nine = 1;
  for (int i = 1; i < 10; ++i) nine *= i;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i].first >> a[i].second;
    allx.push_back(a[i].first);
    ally.push_back(a[i].second);
  }
  sort(a, a + n);
  build(0, 0, n);
  sort(allx.begin(), allx.end());
  allx.resize(unique(allx.begin(), allx.end()) - allx.begin());
  sort(ally.begin(), ally.end());
  ally.resize(unique(ally.begin(), ally.end()) - ally.begin());
  int help;
  for (int i = 0; i < n; ++i) {
    help = lower_bound(allx.begin(), allx.end(), a[i].first) - allx.begin();
    sumx[help]++;
    help = lower_bound(ally.begin(), ally.end(), a[i].second) - ally.begin();
    sumy[help]++;
  }
  for (int i = 1; i < n; ++i) sumx[i] += sumx[i - 1], sumy[i] += sumy[i - 1];
  for (int i = 0; i < 9; ++i) cin >> p[i];
  for (int i = 0; i < nine; ++i) {
    base();
    next_permutation(p, p + 9);
  }
  cout << -1;
}