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 = 100000 + 15;
const int maxp = 100000 * 20 + 15;
struct Node {
  int x, y, ry, rx;
  Node() { x = y = ry = rx = 0; }
} a[maxn];
struct Point {
  int l, r, sum;
  Point() { l = r = sum = 0; }
  Point(int l, int r, int sum) : l(l), r(r), sum(sum) {}
} tree[maxp];
int tot, qq[15], gg[15], dd[15], lin[15];
bool boo[15];
int root[maxn];
int n;
int dy[maxn], dy2[maxn];
int sx, sum[maxn], sy;
bool cm1(Node a, Node b) { return a.x < b.x; }
bool cm2(Node a, Node b) { return a.y < b.y; }
int inser(int root, int l, int r, int x) {
  if (l > x || r < x) return root;
  int now = ++tot;
  tree[now] = tree[root];
  tree[now].sum++;
  if (l == r) return now;
  int mid = (l + r) >> 1;
  tree[now].l = inser(tree[now].l, l, mid, x);
  tree[now].r = inser(tree[now].r, mid + 1, r, x);
  return now;
}
int found(int root, int l, int r, int x) {
  if (l == r) {
    if (tree[root].sum != x) return -1;
    return l;
  }
  int mid = (l + r) >> 1;
  if (tree[tree[root].l].sum >= x) return found(tree[root].l, l, mid, x);
  return found(tree[root].r, mid + 1, r, x - tree[tree[root].l].sum);
}
int found2(int root, int l, int r, int x) {
  if (l > x) return 0;
  int mid = (l + r) >> 1;
  if (mid <= x)
    return tree[tree[root].l].sum + found2(tree[root].r, mid + 1, r, x);
  return found2(tree[root].l, l, mid, x);
}
bool sorr(int now) {
  if (now > 9) {
    for (int i = 1; i <= 9; i++) gg[lin[i]] = qq[i];
    for (int i = 1; i <= 9; i++) dd[i] = gg[i];
    for (int i = 1; i <= 9; i++) gg[i] += gg[i - 1];
    int l = 0, r = sx, midd;
    while (l + 1 < r) {
      midd = (l + r) >> 1;
      if (sum[midd] >= gg[3])
        r = midd;
      else
        l = midd;
    }
    int x1 = r;
    if (sum[x1] != gg[3]) return false;
    l = x1, r = sx;
    while (l + 1 < r) {
      midd = (l + r) >> 1;
      if (sum[midd] >= gg[6])
        r = midd;
      else
        l = midd;
    }
    int x2 = r;
    if (sum[x2] != gg[6]) return false;
    int y1 = max(found(root[x1], 1, sy, gg[1]),
                 found(root[x2], 1, sy, gg[1] + dd[4]));
    y1 = max(y1, found(root[sx], 1, sy, gg[1] + dd[4] + dd[7]));
    if (y1 == -1) return false;
    int y2 = max(found(root[x1], 1, sy, gg[2]),
                 found(root[x2], 1, sy, gg[2] + dd[4] + dd[5]));
    y2 = max(y2, found(root[sx], 1, sy, gg[2] + dd[4] + dd[5] + dd[7] + dd[8]));
    if (y2 == -1) return false;
    if (found2(root[x1], 1, sy, y1) != dd[1]) return false;
    if (found2(root[x1], 1, sy, y2) != gg[2]) return false;
    if (found2(root[x2], 1, sy, y1) - dd[1] != dd[4]) return false;
    if (found2(root[x2], 1, sy, y2) - gg[2] - dd[4] != dd[5]) return false;
    if (found2(root[sx], 1, sy, y1) - dd[1] - dd[4] != dd[7]) return false;
    if (found2(root[sx], 1, sy, y2) - gg[2] - dd[4] - dd[5] - dd[7] != dd[8])
      return false;
    printf("%.9lf %.9lf\n", 0.5 + dy[x1], 0.5 + dy[x2]);
    printf("%.9lf %.9lf\n", 0.5 + dy2[y1], 0.5 + dy2[y2]);
    return true;
  }
  for (int i = 1; i <= 9; i++)
    if (!boo[i]) {
      boo[i] = true;
      lin[now] = i;
      if (sorr(now + 1)) return true;
      boo[i] = false;
    }
  return false;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d%d", &a[i].x, &a[i].y), a[i].rx = a[i].x, a[i].ry = a[i].y;
  for (int i = 1; i <= 9; i++) scanf("%d", &qq[i]);
  sort(a + 1, a + n + 1, cm1);
  sum[sx = 1] = 1;
  dy[1] = a[1].rx;
  a[1].x = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i].rx != a[i - 1].rx) sx++, dy[sx] = a[i].rx;
    sum[sx]++;
    a[i].x = sx;
  }
  for (int i = 1; i <= sx; i++) sum[i] += sum[i - 1];
  sort(a + 1, a + n + 1, cm2);
  sy = 1;
  a[1].y = 1;
  dy2[1] = a[1].ry;
  for (int i = 2; i <= n; i++) {
    if (a[i].ry != a[i - 1].ry) sy++, dy2[sy] = a[i].ry;
    a[i].y = sy;
  }
  sort(a + 1, a + n + 1, cm1);
  for (int i = 1; i <= n; i++)
    root[a[i].x] = inser(root[a[i - 1].x], 1, sy, a[i].y);
  if (!sorr(1)) printf("-1\n");
  return 0;
}