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;
int n, top;
int tree[10001000], lson[10001000], rson[10001000], root[100100];
struct ty {
  int x, y;
} s[100100];
bool operator<(ty c1, ty c2) { return c1.x < c2.x; }
int a[12];
int used[12], val[5][5];
int maxx1, maxx2, minn1, minn2;
void build(int la, int now, int left, int right, int x) {
  if (left == right) {
    tree[now] = tree[la] + 1;
    return;
  }
  int mid = left + right >> 1;
  if (x <= mid) {
    lson[now] = ++top;
    rson[now] = rson[la];
    build(lson[la], lson[now], left, mid, x);
  } else {
    lson[now] = lson[la];
    rson[now] = ++top;
    ++mid;
    build(rson[la], rson[now], mid, right, x);
  }
  tree[now] = tree[lson[now]] + tree[rson[now]];
}
int ask(int la, int now, int head, int tail, int c) {
  if (head == tail) return head;
  int mid = head + tail >> 1;
  if (tree[lson[now]] - tree[lson[la]] >= c)
    return ask(lson[la], lson[now], head, mid, c);
  return ask(rson[la], rson[now], mid + 1, tail,
             c - tree[lson[now]] + tree[lson[la]]);
}
void check() {
  int k1, k2, w;
  k1 = val[1][1] + val[1][2] + val[1][3];
  k2 = k1 + val[2][1] + val[2][2] + val[2][3];
  if (s[k1].x == s[k1 + 1].x) return;
  if (s[k2].x == s[k2 + 1].x) return;
  minn1 = minn2 = 2 * 1e9;
  maxx1 = maxx2 = -2 * 1e9;
  w = ask(root[0], root[k1], -1000000000, 1000000000, val[1][1]);
  minn1 = w;
  w = ask(root[0], root[k1], -1000000000, 1000000000, val[1][1] + 1);
  maxx1 = w;
  w = ask(root[0], root[k1], -1000000000, 1000000000, val[1][1] + val[1][2]);
  minn2 = w;
  w = ask(root[0], root[k1], -1000000000, 1000000000,
          val[1][1] + val[1][2] + 1);
  maxx2 = w;
  w = ask(root[k1], root[k2], -1000000000, 1000000000, val[2][1]);
  if (w > minn1) minn1 = w;
  w = ask(root[k1], root[k2], -1000000000, 1000000000, val[2][1] + 1);
  if (maxx1 > w) maxx1 = w;
  w = ask(root[k1], root[k2], -1000000000, 1000000000, val[2][1] + val[2][2]);
  if (w > minn2) minn2 = w;
  w = ask(root[k1], root[k2], -1000000000, 1000000000,
          val[2][1] + val[2][2] + 1);
  if (maxx2 > w) maxx2 = w;
  w = ask(root[k2], root[n], -1000000000, 1000000000, val[3][1]);
  if (w > minn1) minn1 = w;
  w = ask(root[k2], root[n], -1000000000, 1000000000, val[3][1] + 1);
  if (maxx1 > w) maxx1 = w;
  w = ask(root[k2], root[n], -1000000000, 1000000000, val[3][1] + val[3][2]);
  if (w > minn2) minn2 = w;
  w = ask(root[k2], root[n], -1000000000, 1000000000,
          val[3][1] + val[3][2] + 1);
  if (maxx2 > w) maxx2 = w;
  if (minn1 < maxx1 && minn2 < maxx2) {
    printf("%lf %lf\n%lf %lf\n", 0.5 + s[k1].x, 0.5 + s[k2].x, 0.5 + minn1,
           0.5 + minn2);
    exit(0);
  }
}
void dfs(int xx, int yy) {
  if (xx == 4) {
    check();
    return;
  }
  for (int i = 1; i <= 9; ++i)
    if (!used[i]) {
      used[i] = 1;
      val[xx][yy] = a[i];
      if (yy == 3)
        dfs(xx + 1, 1);
      else
        dfs(xx, yy + 1);
      used[i] = 0;
    }
}
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d%d", &s[i].x, &s[i].y);
  sort(s + 1, s + n + 1);
  for (i = 1; i <= n; ++i) {
    root[i] = ++top;
    build(root[i - 1], root[i], -1000000000, 1000000000, s[i].y);
  }
  for (i = 1; i <= 9; ++i) scanf("%d", a + i);
  dfs(1, 1);
  puts("-1");
  return 0;
}