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 N = 1e5 + 3;
struct point {
  int x, y, id;
  bool operator<(const point &b) const {
    if (x != b.x) return x < b.x;
    return y != b.y ? y < b.y : id < b.id;
  }
} p[25 * N];
int ans[25 * N], cnt[10], c[10], n, q, mx, my;
int bit[N], ax[N], ay[N], sx[N], sy[N];
void ins(int x) {
  for (; x <= my; x += x & (-x)) bit[x]++;
}
int qry(int x) {
  int ans = 0;
  for (; x >= 1; x &= x - 1) ans += bit[x];
  return ans;
}
int rk;
bool vis[25 * N];
bool solve(int &cur, bool tag) {
  rk++;
  if (tag && !vis[rk]) return 0;
  int s1 = cnt[1] + cnt[2] + cnt[3];
  int s2 = cnt[4] + cnt[5] + cnt[6];
  int x1 = upper_bound(sx + 1, sx + mx + 1, s1) - sx - 1;
  if (sx[x1] != s1) return 0;
  int x2 = upper_bound(sx + 1, sx + mx + 1, s1 + s2) - sx - 1;
  if (sx[x2] != s1 + s2) return 0;
  s1 = cnt[3] + cnt[6] + cnt[9];
  s2 = cnt[2] + cnt[5] + cnt[8];
  int y1 = upper_bound(sy + 1, sy + my + 1, s1) - sy - 1;
  if (sy[y1] != s1) return 0;
  int y2 = upper_bound(sy + 1, sy + my + 1, s1 + s2) - sy - 1;
  if (sy[y2] != s1 + s2) return 0;
  if (!tag) {
    vis[rk] = 1;
    p[++q] = (point){x1, y1, ++cur};
    p[++q] = (point){x1, y2, ++cur};
    p[++q] = (point){x2, y1, ++cur};
    p[++q] = (point){x2, y2, ++cur};
    return 0;
  }
  cur += 4;
  if (ans[cur - 3] != cnt[3]) return 0;
  if (ans[cur - 2] != cnt[3] + cnt[2]) return 0;
  if (ans[cur - 1] != cnt[3] + cnt[6]) return 0;
  if (ans[cur] != cnt[3] + cnt[2] + cnt[6] + cnt[5]) return 0;
  printf("%.1f %.1f\n%.1f %.1f\n", 0.5 + ax[x1], 0.5 + ax[x2], 0.5 + ay[y1],
         0.5 + ay[y2]);
  return 1;
}
int main() {
  scanf("%d", &n);
  q = n;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &p[i].x, &p[i].y);
    ax[i] = p[i].x;
    ay[i] = p[i].y;
  }
  for (int i = 1; i <= 9; i++) scanf("%d", cnt + i);
  sort(ax + 1, ax + n + 1);
  sort(ay + 1, ay + n + 1);
  mx = unique(ax + 1, ax + n + 1) - ax - 1;
  my = unique(ay + 1, ay + n + 1) - ay - 1;
  for (int i = 1; i <= n; i++) {
    p[i].x = lower_bound(ax + 1, ax + mx + 1, p[i].x) - ax;
    p[i].y = lower_bound(ay + 1, ay + my + 1, p[i].y) - ay;
    sx[p[i].x]++;
    sy[p[i].y]++;
    p[i].id = 0;
  }
  for (int i = 1; i <= mx; i++) sx[i] += sx[i - 1];
  for (int i = 1; i <= my; i++) sy[i] += sy[i - 1];
  sort(cnt + 1, cnt + 10);
  copy(cnt + 1, cnt + 10, c + 1);
  int cur = 0;
  do {
    solve(cur, 0);
  } while (next_permutation(cnt + 1, cnt + 10));
  sort(p + 1, p + q + 1);
  for (int i = 1; i <= q; i++) {
    if (p[i].id == 0)
      ins(p[i].y);
    else
      ans[p[i].id] = qry(p[i].y);
  }
  copy(c + 1, c + 10, cnt + 1);
  cur = rk = 0;
  do {
    if (solve(cur, 1)) return 0;
  } while (next_permutation(cnt + 1, cnt + 10));
  puts("-1");
  return 0;
}