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;
template <class T>
inline void read(T &x) {
  int f = 0, ch = 0;
  x = 0;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = 1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - 48;
  if (f) x = -x;
}
struct Point {
  int x, y;
} d[(200005)];
int a[11], c[11], s[11];
int rt[(200005)], x[(200005)], fx[(200005)], fy[(200005)], y[(200005)],
    ax[(200005)], ay[(200005)], n, lm;
inline bool cmp(Point A, Point B) { return A.x < B.x; }
struct SegmentTree {
  int sz[(200005) * 25], lc[(200005) * 25], rc[(200005) * 25], cnt;
  inline void ins(int &u, int pr, int l, int r, int pos) {
    u = ++cnt;
    lc[u] = lc[pr], rc[u] = rc[pr], sz[u] = sz[pr] + 1;
    if (l == r) return;
    int mid = l + r >> 1;
    if (pos <= mid)
      ins(lc[u], lc[pr], l, mid, pos);
    else
      ins(rc[u], rc[pr], mid + 1, r, pos);
  }
  inline pair<int, int> query(int u, int l, int r, int res, int k) {
    if (l == r) return make_pair(res + sz[u], l);
    int mid = l + r >> 1, lsize = sz[lc[u]];
    if (k <= lsize)
      return query(lc[u], l, mid, res, k);
    else
      return query(rc[u], mid + 1, r, res + lsize, k - lsize);
  }
  inline int ask(int x, int y, int l, int r, int L, int R) {
    if (l >= L && r <= R) return sz[y] - sz[x];
    int mid = l + r >> 1, res = 0;
    if (L <= mid) res += ask(lc[x], lc[y], l, mid, L, R);
    if (mid < R) res += ask(rc[x], rc[y], mid + 1, r, L, R);
    return res;
  }
} van;
inline int queryx(int x) {
  int l = 1, r = lm, ans = -1;
  while (l <= r) {
    int mid = l + r >> 1;
    if (van.sz[rt[mid]] <= x)
      ans = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  if (ans == -1) return ans;
  if (van.sz[rt[ans]] != x) return -1;
  return ans;
}
inline int queryy(int x) {
  pair<int, int> res = van.query(rt[lm], 1, n, 0, x);
  if (res.first == x)
    return res.second;
  else
    return -1;
}
inline void solve() {
  for (int i = 1; i <= 9; i++) a[i] = s[c[i]];
  int xx1 = a[1] + a[2] + a[3], xx2 = xx1 + a[4] + a[5] + a[6];
  int yy1 = a[1] + a[4] + a[7], yy2 = yy1 + a[2] + a[5] + a[8];
  int px1 = queryx(xx1);
  if (px1 == -1) return;
  int px2 = queryx(xx2);
  if (px2 == -1) return;
  int py1 = queryy(yy1);
  if (py1 == -1) return;
  int py2 = queryy(yy2);
  if (py2 == -1) return;
  if (van.ask(rt[0], rt[px1], 1, n, 1, py1) != a[1]) return;
  if (van.ask(rt[0], rt[px1], 1, n, py1 + 1, py2) != a[2]) return;
  if (van.ask(rt[0], rt[px1], 1, n, py2 + 1, n) != a[3]) return;
  if (van.ask(rt[px1], rt[px2], 1, n, 1, py1) != a[4]) return;
  if (van.ask(rt[px1], rt[px2], 1, n, py1 + 1, py2) != a[5]) return;
  if (van.ask(rt[px1], rt[px2], 1, n, py2 + 1, n) != a[6]) return;
  if (van.ask(rt[px2], rt[lm], 1, n, 1, py1) != a[7]) return;
  if (van.ask(rt[px2], rt[lm], 1, n, py1 + 1, py2) != a[8]) return;
  if (van.ask(rt[px2], rt[lm], 1, n, py2 + 1, n) != a[9]) return;
  printf("%.12lf %.12lf\n", fx[px1] + 0.5, fx[px2] + 0.5);
  printf("%.12lf %.12lf\n", fy[py1] + 0.5, fy[py2] + 0.5);
  exit(0);
}
int main() {
  read(n);
  for (int i = 1; i <= n; i++)
    read(ax[i]), read(ay[i]), x[i] = ax[i], y[i] = ay[i];
  for (int i = 1; i <= 9; i++) read(s[i]), c[i] = i;
  sort(x + 1, x + n + 1), sort(y + 1, y + n + 1);
  int sx = unique(x + 1, x + n + 1) - x - 1;
  int sy = unique(y + 1, y + n + 1) - y - 1;
  for (int i = 1; i <= n; i++) {
    d[i].x = lower_bound(x + 1, x + sx + 1, ax[i]) - x;
    d[i].y = lower_bound(y + 1, y + sy + 1, ay[i]) - y;
    fx[d[i].x] = ax[i], fy[d[i].y] = ay[i];
  }
  sort(d + 1, d + n + 1, cmp);
  for (int i = 1; i <= n; i++) {
    if (d[i].x == d[i - 1].x)
      van.ins(rt[d[i].x], rt[d[i].x], 1, n, d[i].y);
    else
      van.ins(rt[d[i].x], rt[d[i - 1].x], 1, n, d[i].y), lm++;
  }
  for (int i = 1; i <= 362880; i++) solve(), next_permutation(c + 1, c + 10);
  puts("-1");
  return 0;
}