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 n, m, e[15], c[100005], d[100005], sx[100005], sy[100005], t[100005],
    used[400005], p[400005][15];
struct node {
  int x, y, z, u, fl;
} q[800005];
struct node1 {
  int x, y;
} f[100005];
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = (x + (x << 2) << 1) + (ch ^ 48);
  return x * f;
}
bool cmp(const node &x, const node &y) { return x.z < y.z; }
bool cmp1(const node1 &x, const node1 &y) { return x.y < y.y; }
void add(int x) {
  while (x <= c[0]) t[x]++, x += x & -x;
}
int query(int x) {
  int ans = 0;
  while (x) ans += t[x], x &= x - 1;
  return ans;
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) c[i] = f[i].x = read(), d[i] = f[i].y = read();
  sort(c + 1, c + n + 1), sort(d + 1, d + n + 1),
      c[0] = unique(c + 1, c + n + 1) - c - 1,
      d[0] = unique(d + 1, d + n + 1) - d - 1;
  for (int i = 1; i <= n; i++)
    f[i].x = lower_bound(c + 1, c + c[0] + 1, f[i].x) - c,
    f[i].y = lower_bound(d + 1, d + d[0] + 1, f[i].y) - d, sx[f[i].x]++,
    sy[f[i].y]++;
  for (int i = 2; i <= c[0]; i++) sx[i] += sx[i - 1];
  for (int i = 2; i <= d[0]; i++) sy[i] += sy[i - 1];
  for (int i = 1; i <= 9; i++) e[i] = read();
  sort(e + 1, e + 10), sort(f + 1, f + n + 1, cmp1);
  do {
    int l = 1, r = d[0] - 1;
    m += 2, q[m].fl = q[m - 1].fl = m >> 1;
    for (int i = 1; i <= 9; i++) p[m >> 1][i] = e[i];
    while (l < r) {
      int mid = l + r >> 1;
      if (sy[mid] < e[1] + e[2] + e[3])
        l = mid + 1;
      else
        r = mid;
    }
    q[m - 1].z = q[m].u = l, l = 1, r = d[0] - 1;
    while (l < r) {
      int mid = l + r >> 1;
      if (sy[d[0]] - sy[mid] > e[7] + e[8] + e[9])
        l = mid + 1;
      else
        r = mid;
    }
    q[m].z = l, l = 1, r = c[0] - 1;
    while (l < r) {
      int mid = l + r >> 1;
      if (sx[mid] < e[1] + e[4] + e[7])
        l = mid + 1;
      else
        r = mid;
    }
    q[m].x = q[m - 1].x = l, l = 1, r = c[0] - 1;
    while (l < r) {
      int mid = l + r >> 1;
      if (sx[c[0]] - sx[mid] > e[3] + e[6] + e[9])
        l = mid + 1;
      else
        r = mid;
    }
    q[m].y = q[m - 1].y = l;
  } while (next_permutation(e + 1, e + 10));
  sort(q + 1, q + m + 1, cmp);
  for (int i = 1, j = 1; i <= m; i++) {
    int k = q[i].fl;
    if (used[k] == -1) continue;
    while (j <= n && f[j].y <= q[i].z) add(f[j].x), j++;
    if (used[k]) {
      int x = query(q[i].x), y = query(q[i].y), z = query(c[0]);
      if (x != p[k][4] + p[k][1] || y - x != p[k][5] + p[k][2] ||
          z - y != p[k][6] + p[k][3])
        continue;
      if (sx[q[i].x] - x != p[k][7] || sx[q[i].y] - y != p[k][7] + p[k][8] ||
          sx[c[0]] - z != p[k][7] + p[k][8] + p[k][9])
        continue;
      return printf("%lf %lf\n%lf %lf", (c[q[i].x] + c[q[i].x + 1]) / 2.0,
                    (c[q[i].y] + c[q[i].y + 1]) / 2.0,
                    (d[q[i].u] + d[q[i].u + 1]) / 2.0,
                    (d[q[i].z] + d[q[i].z + 1]) / 2.0),
             0;
    } else {
      int x = query(q[i].x), y = query(q[i].y), z = query(c[0]);
      if (x == p[k][1] && y - x == p[k][2] && z - y == p[k][3])
        used[k] = 1;
      else
        used[k] = -1;
    }
  }
  puts("-1");
  return 0;
}