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;
int xptr[200000], yptr[200000];
vector<pair<int, int> > pt;
vector<int> a(9), seg[200000 << 2];
map<int, int> xVal, yVal;
map<int, bool> xOK, yOK;
bool byx(const int &A, const int &B) { return pt[A].first < pt[B].first; }
bool byy(const int &A, const int &B) { return pt[A].second < pt[B].second; }
void init(int ptr, int lo, int hi) {
  if (lo > hi) return;
  int mi = (lo + hi) / 2;
  for (int i = (lo); i < (hi + 1); ++i) seg[ptr].push_back(pt[xptr[i]].second);
  sort(seg[ptr].begin(), seg[ptr].end());
  if (lo != hi) init(ptr * 2 + 1, lo, mi), init(ptr * 2 + 2, mi + 1, hi);
}
int query(int ptr, int lo, int hi, int L, int R, int yBound) {
  if (L > R || lo > hi) return 0;
  int mi = (lo + hi) / 2;
  if (L <= lo && hi <= R) {
    int cnt = -1;
    int plo = 0, phi = (int)seg[ptr].size() - 1;
    while (plo <= phi) {
      int pmi = (plo + phi) / 2;
      if (seg[ptr][pmi] > yBound)
        phi = pmi - 1;
      else
        cnt = max(cnt, pmi), plo = pmi + 1;
    }
    return cnt + 1;
  }
  if (hi < L || lo > R) return 0;
  return query(ptr * 2 + 1, lo, mi, L, R, yBound) +
         query(ptr * 2 + 2, mi + 1, hi, L, R, yBound);
}
int main(int argc, char **argv) {
  int N;
  cin >> N;
  pt = vector<pair<int, int> >(N);
  for (int i = (0); i < (N); ++i) {
    cin >> (pt[i]).first >> (pt[i]).second;
    xptr[i] = yptr[i] = i;
  }
  sort(xptr, xptr + N, byx);
  sort(yptr, yptr + N, byy);
  int pre = pt[xptr[0]].first, cnt = 0;
  xVal[0] = -1;
  xOK[0] = true;
  for (int i = (0); i < (N); ++i)
    if (pre == pt[xptr[i]].first)
      cnt++;
    else
      xVal[cnt] = i - 1, xOK[cnt] = true, cnt++, pre = pt[xptr[i]].first;
  xVal[cnt] = N - 1, xOK[cnt] = true;
  pre = pt[yptr[0]].second, cnt = 0;
  yVal[0] = -1;
  yOK[0] = true;
  for (int i = (0); i < (N); ++i)
    if (pre == pt[yptr[i]].second)
      cnt++;
    else
      yVal[cnt] = i - 1, yOK[cnt] = true, cnt++, pre = pt[yptr[i]].second;
  yVal[cnt] = N - 1, yOK[cnt] = true;
  init(0, 0, N - 1);
  for (int i = (0); i < (9); ++i) cin >> a[i];
  sort(a.begin(), a.end());
  do {
    int rowSum[3] = {0}, colSum[3] = {0};
    for (int i = (0); i < (9); ++i)
      rowSum[i / 3] += a[i], colSum[i % 3] += a[i];
    if (!xOK[colSum[0]] || !xOK[colSum[0] + colSum[1]]) continue;
    if (!yOK[rowSum[2]] || !yOK[rowSum[1] + rowSum[2]]) continue;
    int x1, x2, y1, y2;
    x1 = xVal[colSum[0]], x2 = xVal[colSum[0] + colSum[1]];
    y1 = yVal[rowSum[2]], y2 = yVal[rowSum[1] + rowSum[2]];
    if (x1 == x2 || y1 == y2) continue;
    int lowerLeft =
        query(0, 0, N - 1, 0, x1, y1 == -1 ? -2000000002 : pt[yptr[y1]].second);
    int upperLeft = query(0, 0, N - 1, 0, x1,
                          y2 == -1 ? -2000000002 : pt[yptr[y2]].second) -
                    lowerLeft;
    int lowerRight = query(0, 0, N - 1, 0, x2,
                           y1 == -1 ? -2000000002 : pt[yptr[y1]].second) -
                     lowerLeft;
    int upperRight = query(0, 0, N - 1, 0, x2,
                           y2 == -1 ? -2000000002 : pt[yptr[y2]].second) -
                     lowerRight - lowerLeft - upperLeft;
    if (lowerLeft == a[6] && upperLeft == a[3] && lowerRight == a[7] &&
        upperRight == a[4]) {
      printf("%.6f %.6f\n%.6f %.6f\n",
             x1 == -1 ? -2000000002.5 : pt[xptr[x1]].first + .5,
             x2 == -1 ? -2000000002.5 : pt[xptr[x2]].first + .5,
             y1 == -1 ? -2000000002.5 : pt[yptr[y1]].second + .5,
             y2 == -1 ? -2000000002.5 : pt[yptr[y2]].second + .5);
      return 0;
    }
  } while (next_permutation(a.begin(), a.end()));
  puts("-1");
  return 0;
}