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 maxn = 100000 * 2 + 5;
struct BIT {
  int c[maxn];
  int n;
  void init(int n) {
    n += 5;
    this->n = n;
    fill(c, c + n, 0);
  }
  int query(int i) const {
    i += 5;
    int ret = 0;
    for (; i > 0; i -= ((i) & (-i))) ret += c[i];
    return ret;
  }
  void update(int i, int d) {
    i += 5;
    for (; i < n; i += ((i) & (-i))) c[i] += d;
  }
};
struct Point {
  int x, y;
  void read() { scanf("%d%d", &x, &y); }
  Point() {}
  Point(int x, int y) : x(x), y(y) {}
};
struct ByX {
  bool operator()(const Point& a, const Point& b) const { return a.x < b.x; }
};
struct ByY {
  bool operator()(const Point& a, const Point& b) const { return a.y < b.y; }
};
struct Query : Point {
  int ind, ans;
  Query(int x, int y, int ans, int ind) : Point(x, y), ans(ans), ind(ind) {}
};
struct ByInd {
  bool operator()(const Query& a, const Query& b) const {
    return a.ind < b.ind;
  }
};
struct Candidate {
  int x1, x2, y1, y2;
  Candidate(int x1, int x2, int y1, int y2) : x1(x1), x2(x2), y1(y1), y2(y2) {}
};
Point pByX[maxn], pByY[maxn];
int X[maxn], Xcnt[maxn], Xsum[maxn], Xn;
int Y[maxn], Ycnt[maxn], Ysum[maxn], Yn;
vector<Candidate> candidates;
vector<Query> queries;
void solve(int n) {
  candidates.clear();
  queries.clear();
  Xn = Yn = 0;
  int val[9];
  for (int i = 0; i < n; ++i) pByX[i].read();
  for (int k = 0; k < 9; ++k) cin >> val[k];
  sort(pByX, pByX + n, ByX());
  copy(pByX, pByX + n, pByY);
  sort(pByY, pByY + n, ByY());
  for (int i = 0, j; i < n; i = j, ++Xn) {
    for (j = i + 1; j < n && pByX[i].x == pByX[j].x; ++j)
      ;
    X[Xn] = pByX[i].x;
    Xcnt[Xn] = j - i;
  }
  for (int i = 0, j; i < n; i = j, ++Yn) {
    for (j = i + 1; j < n && pByY[i].y == pByY[j].y; ++j)
      ;
    Y[Yn] = pByY[i].y;
    Ycnt[Yn] = j - i;
  }
  partial_sum(Xcnt, Xcnt + Xn, Xsum);
  Xsum[Xn] = -1;
  partial_sum(Ycnt, Ycnt + Yn, Ysum);
  Ysum[Yn] = -1;
  int id = 0;
  sort(val, val + 9);
  do {
    int sumX1 = val[0] + val[3] + val[6];
    int sumX2 = sumX1 + val[1] + val[4] + val[7];
    int sumY1 = val[0] + val[1] + val[2];
    int sumY2 = sumY1 + val[3] + val[4] + val[5];
    int pivotX1 = lower_bound(Xsum, Xsum + Xn, sumX1) - Xsum;
    if (Xsum[pivotX1] != sumX1) continue;
    int pivotX2 = lower_bound(Xsum, Xsum + Xn, sumX2) - Xsum;
    if (Xsum[pivotX2] != sumX2) continue;
    int pivotY1 = lower_bound(Ysum, Ysum + Yn, sumY1) - Ysum;
    if (Ysum[pivotY1] != sumY1) continue;
    int pivotY2 = lower_bound(Ysum, Ysum + Yn, sumY2) - Ysum;
    if (Ysum[pivotY2] != sumY2) continue;
    queries.push_back(Query(pivotX1, pivotY1, val[0], candidates.size()));
    queries.push_back(
        Query(pivotX2, pivotY1, val[0] + val[1], candidates.size()));
    queries.push_back(
        Query(pivotX1, pivotY2, val[0] + val[3], candidates.size()));
    queries.push_back(Query(pivotX2, pivotY2, val[0] + val[1] + val[3] + val[4],
                            candidates.size()));
    candidates.push_back(
        Candidate(X[pivotX1], X[pivotX2], Y[pivotY1], Y[pivotY2]));
  } while (next_permutation(val, val + 9));
  sort(queries.begin(), queries.end(), ByX());
  static BIT bit;
  bit.init(Yn);
  for (int k = 0, iq = 0, ip = 0; k < Xn; ++k) {
    for (; ip < n && pByX[ip].x == X[k]; ++ip) {
      int yInd = lower_bound(Y, Y + Yn, pByX[ip].y) - Y;
      bit.update(yInd, 1);
    }
    for (; iq < queries.size() && queries[iq].x == k; ++iq) {
      int yInd = queries[iq].y;
      if (queries[iq].ans != bit.query(yInd)) {
        queries[iq].ans = -1;
      }
    }
  }
  sort(queries.begin(), queries.end(), ByInd());
  cout << fixed;
  for (int iq = 0; iq < queries.size(); iq += 4) {
    if (queries[iq].ans == -1) continue;
    if (queries[iq + 1].ans == -1) continue;
    if (queries[iq + 2].ans == -1) continue;
    if (queries[iq + 3].ans == -1) continue;
    int id = queries[iq].ind;
    cout << candidates[id].x1 + 0.5 << " " << candidates[id].x2 + 0.5 << endl;
    cout << candidates[id].y1 + 0.5 << " " << candidates[id].y2 + 0.5 << endl;
    return;
  }
  cout << -1 << endl;
}
int main() {
  for (int n; cin >> n; solve(n))
    ;
}