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 = 100010;
struct node {
  int sum, ch[2];
} t[N * 60];
int cnt, n;
void update(int& x, int y, int p, int val, int lp = 1, int rp = n) {
  x = ++cnt;
  t[x] = t[y];
  t[x].sum += val;
  if (lp == rp) return;
  int mid = (lp + rp) >> 1;
  if (p <= mid)
    update(t[x].ch[0], t[y].ch[0], p, val, lp, mid);
  else
    update(t[x].ch[1], t[y].ch[1], p, val, mid + 1, rp);
}
struct point {
  int x, y;
  bool operator<(const point& a) const { return x < a.x; }
} po[N];
int px[N], py[N], rt[N], a[15], per[15], num[15];
int query(int k, int x, int y, int lp = 1, int rp = n) {
  if (lp == rp) return lp;
  int mid = (lp + rp) >> 1;
  int v = t[t[x].ch[0]].sum - t[t[y].ch[0]].sum;
  if (k <= v)
    return query(k, t[x].ch[0], t[y].ch[0], lp, mid);
  else
    return query(k - v, t[x].ch[1], t[y].ch[1], mid + 1, rp);
}
int ask(int l, int r, int x, int y, int lp = 1, int rp = n) {
  if (l > rp || lp > r) return 0;
  if (lp >= l && rp <= r) return t[x].sum - t[y].sum;
  int mid = (lp + rp) >> 1;
  return ask(l, r, t[x].ch[0], t[y].ch[0], lp, mid) +
         ask(l, r, t[x].ch[1], t[y].ch[1], mid + 1, rp);
}
vector<int> tmpx, tmpy;
bool solve() {
  int l, r, ans, mid;
  int x = num[1] + num[2] + num[3];
  l = 0, r = n, ans = n + 1;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (t[rt[mid]].sum >= x)
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  if (t[rt[ans]].sum != x) return 0;
  int px1 = ans;
  int y = num[4] + num[5] + num[6];
  l = px1 + 1, r = n, ans = n + 1;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (t[rt[mid]].sum >= x + y)
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  if (t[rt[ans]].sum != x + y) return 0;
  int px2 = ans;
  x = num[1] + num[4] + num[7];
  int py1 = query(x, rt[n], 0);
  if (ask(1, py1, rt[n], 0) != x) return 0;
  y = num[2] + num[5] + num[8];
  int py2 = query(x + y, rt[n], 0);
  if (ask(1, py2, rt[n], 0) != x + y) return 0;
  if (ask(1, py1, rt[px1], 0) != num[1]) return 0;
  if (ask(1, py1, rt[px2], rt[px1]) != num[4]) return 0;
  if (ask(1, py1, rt[n], rt[px2]) != num[7]) return 0;
  if (ask(py1 + 1, py2, rt[px1], 0) != num[2]) return 0;
  if (ask(py1 + 1, py2, rt[px2], rt[px1]) != num[5]) return 0;
  if (ask(py1 + 1, py2, rt[n], rt[px2]) != num[8]) return 0;
  if (ask(py2 + 1, n, rt[px1], 0) != num[3]) return 0;
  if (ask(py2 + 1, n, rt[px2], rt[px1]) != num[6]) return 0;
  if (ask(py2 + 1, n, rt[n], rt[px2]) != num[9]) return 0;
  printf("%.6lf %.6lf\n", tmpx[px1 - 1] + 0.5, tmpx[px2 - 1] + 0.5);
  printf("%.6lf %.6lf\n", tmpy[py1 - 1] + 0.5, tmpy[py2 - 1] + 0.5);
  return 1;
}
int main() {
  int x, y;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &x, &y);
    tmpx.push_back(x);
    tmpy.push_back(y);
    px[i] = x, py[i] = y;
  }
  sort(tmpx.begin(), tmpx.end());
  sort(tmpy.begin(), tmpy.end());
  tmpx.erase(unique(tmpx.begin(), tmpx.end()), tmpx.end());
  tmpy.erase(unique(tmpy.begin(), tmpy.end()), tmpy.end());
  for (int i = 1; i <= n; ++i) {
    po[i].x = lower_bound(tmpx.begin(), tmpx.end(), px[i]) - tmpx.begin() + 1;
    po[i].y = lower_bound(tmpy.begin(), tmpy.end(), py[i]) - tmpy.begin() + 1;
  }
  sort(po + 1, po + n + 1);
  for (int i = 1, p = 1; i <= n; ++i) {
    rt[i] = rt[i - 1];
    for (; po[p].x == i; ++p) update(rt[i], rt[i], po[p].y, 1);
  }
  for (int i = 1; i <= 9; ++i) scanf("%d", &a[i]), per[i] = i;
  do {
    for (int i = 1; i <= 9; ++i) num[i] = a[per[i]];
    if (solve()) return 0;
  } while (next_permutation(per + 1, per + 10));
  puts("-1");
  return 0;
}