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;
const int MAXST = 362880;
const int DIF = 1e9 + 1;
struct Point {
  int x, y;
};
struct Data {
  int x1, x2, y1, y2;
  int s[9], res[4];
  bool flag;
};
struct Query {
  int x, y, ida, idb;
};
int n;
Point px[MAXN + 10], py[MAXN + 10];
Data o[MAXST + 10];
int toto;
bool cmpx(const Point& a, const Point& b) { return a.x < b.x; }
bool cmpy(const Point& a, const Point& b) { return a.y < b.y; }
bool cmpq(const Query& a, const Query& b) { return a.x < b.x; }
int s[9];
Query q[5 * MAXST + 10];
int totq;
int lst[MAXN + 10], lenlst;
int C[MAXN + 10];
int lowbit(int x) { return x & (-x); }
void update(int x, int y) {
  while (x <= n) {
    C[x] += y;
    x += lowbit(x);
  }
}
int query(int x) {
  int res = 0;
  while (x) {
    res += C[x];
    x -= lowbit(x);
  }
  return res;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &px[i].x, &px[i].y), py[i] = px[i];
  sort(px + 1, px + 1 + n, cmpx);
  sort(py + 1, py + 1 + n, cmpy);
  px[n + 1].x = py[n + 1].y = DIF;
  for (int i = 0; i < 9; ++i) scanf("%d", s + i);
  sort(s, s + 9);
  do {
    int x1 = s[0] + s[3] + s[6], x2 = x1 + s[1] + s[4] + s[7],
        y1 = s[6] + s[7] + s[8], y2 = y1 + s[3] + s[4] + s[5];
    if (px[x1].x != px[x1 + 1].x && px[x2].x != px[x2 + 1].x &&
        py[y1].y != py[y1 + 1].y && py[y2].y != py[y2 + 1].y) {
      x1 = px[x1].x;
      x2 = px[x2].x;
      y1 = py[y1].y;
      y2 = py[y2].y;
      ++toto;
      o[toto].x1 = x1;
      o[toto].x2 = x2;
      o[toto].y1 = y1;
      o[toto].y2 = y2;
      for (int i = 0; i < 9; ++i) o[toto].s[i] = s[i];
      o[toto].flag = true;
      o[toto].res[0] = s[6];
      o[toto].res[1] = s[7] + s[6];
      o[toto].res[2] = s[3] + s[6];
      o[toto].res[3] = s[3] + s[4] + s[6] + s[7];
      q[++totq].x = x1;
      q[totq].y = y1;
      q[totq].ida = toto;
      q[totq].idb = 0;
      q[++totq].x = x2;
      q[totq].y = y1;
      q[totq].ida = toto;
      q[totq].idb = 1;
      q[++totq].x = x1;
      q[totq].y = y2;
      q[totq].ida = toto;
      q[totq].idb = 2;
      q[++totq].x = x2;
      q[totq].y = y2;
      q[totq].ida = toto;
      q[totq].idb = 3;
    }
  } while (next_permutation(s, s + 9));
  sort(q + 1, q + 1 + totq, cmpq);
  for (int i = 1; i <= n; ++i) lst[i] = px[i].y;
  sort(lst + 1, lst + 1 + n);
  lenlst = unique(lst + 1, lst + 1 + n) - lst - 1;
  for (int i = 1; i <= n; ++i)
    px[i].y = lower_bound(lst + 1, lst + 1 + lenlst, px[i].y) - lst;
  for (int i = 1; i <= totq; ++i)
    q[i].y = lower_bound(lst + 1, lst + 1 + lenlst, q[i].y) - lst;
  int now = 0;
  for (int i = 1; i <= totq; ++i) {
    while (now < n && px[now + 1].x <= q[i].x) ++now, update(px[now].y, 1);
    int tmp = query(q[i].y);
    if (o[q[i].ida].res[q[i].idb] != tmp) o[q[i].ida].flag = false;
  }
  for (int i = 1; i <= toto; ++i)
    if (o[i].flag)
      return printf("%.9lf %.9lf\n%.9lf %.9lf", o[i].x1 + 0.3, o[i].x2 + 0.6,
                    o[i].y1 + 0.3, o[i].y2 + 0.6),
             0;
  puts("-1");
  return 0;
}