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 = 200005, Maxm = 20, inf = 999999999 + 208;
int n, N, ty[Maxn], a[Maxm];
int ax[Maxn], ay[Maxn];
inline int get() {
  bool f = false;
  char ch;
  while (!isdigit(ch = getchar()))
    if (ch == '-') f = true;
  int v = ch - 48;
  while (isdigit(ch = getchar())) v = v * 10 + ch - 48;
  return f ? -v : v;
}
struct Point {
  int x, y;
  bool operator<(const Point &rhs) const {
    return x < rhs.x || (x == rhs.x && y < rhs.y);
  }
} city[Maxn];
struct node {
  int cnt;
  node *lc, *rc;
} po[Maxn * 30], *pn = po, *null = po;
class Segment_Tree {
  node *root;
  void ins(node *&x, node *y, int l, int r, int v) {
    (x = ++pn)->cnt = y->cnt + 1;
    if (l == r) return;
    int mid = (l + r) >> 1;
    if (v <= mid)
      x->rc = y->rc, ins(x->lc, y->lc, l, mid, v);
    else
      x->lc = y->lc, ins(x->rc, y->rc, mid + 1, r, v);
  }
  bool check(node *x, int l, int r, int v, int num) {
    if (num < 0 || num > x->cnt) return false;
    if (v == r) return num == x->cnt;
    int mid = (l + r) >> 1;
    return v <= mid ? check(x->lc, l, mid, v, num)
                    : check(x->rc, mid + 1, r, v, num - x->lc->cnt);
  }

 public:
  void set() {
    null->lc = null->rc = null;
    root = null;
  }
  void ins(Segment_Tree &pre, int v) { ins(root, pre.root, 1, N, v); }
  bool check(int v, int num) { return check(root, 1, N, v, num); }
} tr[Maxn];
inline int pd(int *q, int num) { return q[num] < q[num + 1] ? num : inf; }
inline bool check(int x, int y, int num) { return tr[x].check(y, num); }
bool dfs(int idx, int sum) {
  static int c[Maxm], lx[5], ly[5];
  static bool flag[Maxm];
  if (idx > 9) {
    ly[0] = pd(ay, c[3] + c[6] + c[9]);
    if (ly[0] == inf) return false;
    ly[0] = ay[ly[0]];
    ly[1] = pd(ay, n - c[1] - c[4] - c[7]);
    if (ly[1] == inf) return false;
    ly[1] = ay[ly[1]];
    if (!check(lx[0], ly[0], c[3])) return false;
    if (!check(lx[0], ly[1], c[2] + c[3])) return false;
    if (!check(lx[1], ly[0], c[3] + c[6])) return false;
    if (!check(lx[1], ly[1], c[2] + c[3] + c[5] + c[6])) return false;
    printf("%.1lf %.1lf\n", ax[lx[0]] + 0.5, ax[lx[1]] + 0.5);
    printf("%.1lf %.1lf\n", ty[ly[0]] + 0.5, ty[ly[1]] + 0.5);
    return true;
  }
  for (int i = 1, last = 0; i <= 9; i++)
    if (!flag[i] && a[i] != last) {
      if (idx % 3 == 0 && (lx[idx / 3 - 1] = pd(ax, sum + a[i])) == inf)
        continue;
      flag[i] = true;
      c[idx] = a[i];
      if (dfs(idx + 1, sum + a[i])) return true;
      flag[i] = false;
      last = a[i];
    }
  return false;
}
int main() {
  n = get();
  for (int i = 1; i <= n; i++) {
    city[i].x = get();
    ty[i] = city[i].y = get();
  }
  sort(ty + 1, ty + n + 1);
  for (int i = 1; i <= n; i++) ay[i] = ty[i];
  N = unique(ty + 1, ty + n + 1) - ty - 1;
  for (int i = 1; i <= n; i++) {
    city[i].y = lower_bound(ty + 1, ty + N + 1, city[i].y) - ty;
    ay[i] = lower_bound(ty + 1, ty + N + 1, ay[i]) - ty;
  }
  sort(city + 1, city + n + 1);
  tr[0].set();
  for (int i = 1; i <= n; i++) {
    ax[i] = city[i].x;
    tr[i].ins(tr[i - 1], city[i].y);
  }
  sort(a + 1, a + 10);
  for (int i = 1; i <= 9; i++) a[i] = get();
  ax[n + 1] = ay[n + 1] = inf;
  if (!dfs(1, 0)) puts("-1");
  return 0;
}