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 = 100100;
struct Node {
  Node *lchild, *rchild;
  int sum;
} node[maxn * 40], *head[maxn];
int tot;
void initnode(Node *curr) {
  curr->lchild = curr->rchild = NULL;
  curr->sum = 0;
  return;
}
void copypath(int x, Node *curr, Node *last, int ll, int rr) {
  if (last == NULL) return;
  *curr = *last;
  int tm = (ll + rr) >> 1;
  if (x <= tm) {
    curr->lchild = &node[++tot];
    initnode(curr->lchild);
    copypath(x, curr->lchild, last->lchild, ll, tm);
  } else {
    curr->rchild = &node[++tot];
    initnode(curr->rchild);
    copypath(x, curr->rchild, last->rchild, tm + 1, rr);
  }
}
void insert(int x, int v, Node *curr, int ll, int rr) {
  if (ll == rr) {
    curr->sum += v;
    return;
  }
  int tm = (ll + rr) >> 1;
  if (x <= tm) {
    if (curr->lchild == NULL) {
      curr->lchild = &node[++tot];
      initnode(curr->lchild);
    }
    insert(x, v, curr->lchild, ll, tm);
  } else {
    if (curr->rchild == NULL) {
      curr->rchild = &node[++tot];
      initnode(curr->rchild);
    }
    insert(x, v, curr->rchild, tm + 1, rr);
  }
  curr->sum = 0;
  if (curr->lchild) curr->sum += curr->lchild->sum;
  if (curr->rchild) curr->sum += curr->rchild->sum;
}
int query(Node *l, Node *r, int k, int ll, int rr) {
  if (ll == rr) return ll;
  int rsum = 0;
  if (r && r->lchild) rsum += r->lchild->sum;
  if (l && l->lchild) rsum -= l->lchild->sum;
  int tm = (ll + rr) >> 1;
  if (rsum >= k)
    return query(l ? l->lchild : NULL, r->lchild, k, ll, tm);
  else
    return query(l ? l->rchild : NULL, r->rchild, k - rsum, tm + 1, rr);
}
struct Point {
  int x, y;
  void input() { scanf("%d%d", &x, &y); }
  bool operator<(const Point &t) const { return x < t.x; }
} p[maxn];
int a[10], n;
vector<int> yy;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    p[i].input();
    yy.push_back(p[i].y);
  }
  for (int i = 0; i < 9; i++) scanf("%d", a + i);
  sort(a, a + 9);
  sort(p, p + n);
  sort(yy.begin(), yy.end());
  yy.erase(unique(yy.begin(), yy.end()), yy.end());
  for (int i = 0; i <= n; i++) {
    head[i] = &node[i];
    initnode(head[i]);
  }
  tot = n + 1;
  for (int i = 0; i < n; i++) {
    p[i].y = lower_bound(yy.begin(), yy.end(), p[i].y) - yy.begin();
    copypath(p[i].y, head[i + 1], head[i], 0, yy.size() - 1);
    insert(p[i].y, 1, head[i + 1], 0, yy.size() - 1);
  }
  bool pd = true;
  do {
    int x1 = a[0] + a[1] + a[2];
    int x2 = x1 + a[3] + a[4] + a[5];
    if (p[x1].x == p[x1 - 1].x || p[x2].x == p[x2 - 1].x) continue;
    int y1l = 0, y1r = yy.size() - 1, y2l = 0, y2r = yy.size() - 1, tmp;
    y1l = max(y1l, query(head[0], head[x1], a[0], 0, yy.size() - 1));
    y2l = max(y2l, query(head[0], head[x1], a[0] + a[1], 0, yy.size() - 1));
    y1r = min(y1r, query(head[0], head[x1], a[0] + 1, 0, yy.size() - 1));
    y2r = min(y2r, query(head[0], head[x1], a[0] + a[1] + 1, 0, yy.size() - 1));
    y1l = max(y1l, query(head[x1], head[x2], a[3], 0, yy.size() - 1));
    y2l = max(y2l, query(head[x1], head[x2], a[3] + a[4], 0, yy.size() - 1));
    y1r = min(y1r, query(head[x1], head[x2], a[3] + 1, 0, yy.size() - 1));
    y2r =
        min(y2r, query(head[x1], head[x2], a[3] + a[4] + 1, 0, yy.size() - 1));
    y1l = max(y1l, query(head[x2], head[n], a[6], 0, yy.size() - 1));
    y2l = max(y2l, query(head[x2], head[n], a[6] + a[7], 0, yy.size() - 1));
    y1r = min(y1r, query(head[x2], head[n], a[6] + 1, 0, yy.size() - 1));
    y2r = min(y2r, query(head[x2], head[n], a[6] + a[7] + 1, 0, yy.size() - 1));
    if (y1l >= y1r || y2l >= y2r) continue;
    pd = false;
    printf("%.9f %.9f\n%.9f %.9f\n", 0.5 * (p[x1].x + p[x1 - 1].x),
           0.5 * (p[x2].x + p[x2 - 1].x), 0.5 * (yy[y1l] + yy[y1r]),
           0.5 * (yy[y2l] + yy[y2r]));
    break;
  } while (next_permutation(a, a + 9));
  if (pd) printf("-1\n");
  return 0;
}