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;
void run();
int main() {
  ios::sync_with_stdio(0);
  run();
}
struct vec2 {
  int x, y, sum;
  vec2 *c, *rgb;
  bool operator==(vec2 const &a) const { return x == a.x and y == a.y; }
  bool operator<(vec2 const &a) const {
    return x < a.x or x == a.x and y < a.y;
  }
};
int yc[1000002], n;
struct thingy {
  vec2 *things;
  int n, pivot;
  thingy *l, *r;
  thingy(vec2 *u, vec2 *v) {
    pivot = u[rand() % (n = (v - u))].y;
    auto a = u, b = v - 1, c = b;
    while (a <= b)
      if (b->y == pivot)
        swap(a++[0], b[0]);
      else
        --b;
    for (sort(u, b = a); b < c;) {
      while (b < c and b->y < pivot) ++b;
      while (b < c and c->y > pivot) --c;
      if (b < c) swap(*b, *c);
    }
    while (b < v and b->y < pivot) ++b;
    l = (a < b ? new thingy(a, b) : nullptr);
    r = (b < v ? new thingy(b, v) : nullptr);
    int sum = 0;
    vec2 *last[2] = {};
    things = new vec2[n];
    for (int i = 0, j = 0, k = 0, t = 0; t < n; ++t) {
      vec2 &from =
          (i < (a - u) and (j == b - a or u[i] < l->things[j]) and
                   (k == v - b or u[i] < r->things[k])
               ? u[i++]
           : j < (b - a) and (k == v - b or l->things[j] < r->things[k])
               ? l->things[j++]
               : r->things[k++]);
      things[t] = {from.x, from.y, sum += (from.y <= pivot), &from,
                   max((from.y <= pivot ? last[1] : nullptr),
                       (from.y >= pivot ? last[0] : nullptr))};
      if (things[t].y != pivot) last[pivot < things[t].y] = things + t;
    }
  }
  int query(int x, int y) const {
    vec2 *a = things - 1, *b = things + n;
    while (a + 1 < b) {
      vec2 *m = a + (b - a) / 2;
      (m->x <= x ? a : b) = m;
    }
    if (a < things) return 0;
    thingy const *on = this;
    int res = 0;
    while (a and on) {
      if (on->pivot <= y) res += a->sum;
      if (y == on->pivot) return res;
      while (a and (a->y == on->pivot or (a->y < on->pivot) != (y < on->pivot)))
        a = a->rgb;
      if (a) on = (y < on->pivot ? on->l : on->r), a = a->c;
    }
    return res;
  }
  ~thingy() {
    delete things;
    delete l;
    delete r;
  }
};
vec2 v[100002];
void run() {
  int worth[9];
  cin >> n;
  for (int i = n; i--;) cin >> v[i].x >> v[i].y, yc[i] = v[i].y;
  sort(yc, yc + n);
  yc[n] = 1 << 30;
  for (int i = 9; i--;) cin >> worth[i];
  sort(worth, worth + 9);
  thingy data(v, v + n);
  sort(v, v + n);
  v[n].x = 1 << 30;
  do {
    int sx[3] = {}, sy[3] = {}, si[3] = {}, sj[3] = {};
    for (int i = 9; i--;) si[i / 3] += worth[i], sj[i % 3] += worth[i];
    for (int i = 0; i < 2; i++) si[i + 1] += si[i], sj[i + 1] += sj[i];
    for (int i = 3; i--;) si[i]--, sj[i]--;
    if ((sx[0] = v[si[0]].x) == v[si[0] + 1].x) continue;
    if ((sx[1] = v[si[1]].x) == v[si[1] + 1].x) continue;
    if ((sy[0] = yc[sj[0]]) == yc[sj[0] + 1]) continue;
    if ((sy[1] = yc[sj[1]]) == yc[sj[1] + 1]) continue;
    sx[2] = sy[2] = 1 << 30;
    int ya = sy[0];
    int yb = sy[1];
    int u = data.query(sx[0], ya), v = data.query(sx[1], ya),
        w = data.query(sx[2], ya);
    int a = data.query(sx[0], yb), b = data.query(sx[1], yb),
        c = data.query(sx[2], yb);
    if (u - 0 != worth[0]) continue;
    if (v - u != worth[3]) continue;
    if (w - v != worth[6]) continue;
    if (a - 0 != worth[0] + worth[1]) continue;
    if (b - a != worth[3] + worth[4]) continue;
    if (c - b != worth[6] + worth[7]) continue;
    long double ra = sx[0] + 0.5, rb = sx[1] + 0.5, rc = ya + 0.5,
                rd = yb + 0.5;
    cout.precision(10);
    cout << ra << " " << rb << "\n" << rc << " " << rd << endl;
    return;
  } while (next_permutation(worth, worth + 9));
  cout << "-1" << endl;
}