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 = 100005;
struct tree {
  tree *lchild, *rchild;
  int left, right;
  vector<int> f;
} * root;
map<int, int> lsh;
map<int, int>::iterator lshg;
pair<int, int> point[maxn];
int bakx[maxn], baky[maxn], m1[maxn], numx[maxn], numy[maxn], sumx[maxn],
    sumy[maxn], xc[maxn], yc[maxn], whichx[maxn], whichy[maxn];
int nt[10], b[10], dat[10];
int n, j, k, xcs, ycs, qzql, qzqr, qzl, qzr, qzans, ttflag;
void maketree(tree *&node, int left, int right) {
  tree *p;
  p = new tree;
  p->lchild = 0;
  p->rchild = 0;
  p->left = left;
  p->right = right;
  p->f.clear();
  node = p;
  if (left == right) {
    p->f.push_back(yc[left]);
    return;
  }
  maketree(node->lchild, left, (left + right) / 2);
  maketree(node->rchild, (left + right) / 2 + 1, right);
  p->f.resize(p->lchild->f.size() + p->rchild->f.size());
  merge(p->lchild->f.begin(), p->lchild->f.end(), p->rchild->f.begin(),
        p->rchild->f.end(), p->f.begin());
}
void search(tree *p) {
  int l = p->left, r = p->right;
  vector<int>::iterator c1, c2;
  if ((l > qzr) || (r < qzl)) return;
  if ((l == qzl) && (r <= qzr)) {
    qzl = r + 1;
    c1 = lower_bound(p->f.begin(), p->f.end(), qzql);
    c2 = lower_bound(p->f.begin(), p->f.end(), qzqr + 1);
    qzans += c2 - c1;
  } else {
    search(p->lchild);
    search(p->rchild);
  }
}
int getnum(int l, int r, int ql, int qr) {
  qzl = l;
  qzr = r;
  qzans = 0;
  qzql = ql;
  qzqr = qr;
  search(root);
  return qzans;
}
void doit() {
  for (int i = 1; i <= 9; i++) nt[i] = dat[b[i]];
  int c1, c2, c3, c4;
  c1 = nt[1] + nt[4] + nt[7];
  c2 = nt[3] + nt[6] + nt[9];
  c3 = nt[1] + nt[2] + nt[3];
  c4 = nt[7] + nt[8] + nt[9];
  if (bakx[c1] == bakx[c1 + 1]) return;
  if (bakx[n - c2 + 1] == bakx[n - c2]) return;
  if (baky[c3] == baky[c3 + 1]) return;
  c3 = baky[c3];
  if (baky[n - c4 + 1] == baky[n - c4]) return;
  c4 = baky[n - c4 + 1];
  if ((getnum(1, c1, 1, c3) == nt[1]) &&
      (getnum(n - c2 + 1, n, 1, c3) == nt[3]) &&
      (getnum(1, c1, c4, n) == nt[7]) &&
      (getnum(n - c2 + 1, n, c4, n) == nt[9])) {
    ttflag = 0;
    printf("%.10lf %.10lf\n", whichx[bakx[c1]] + 0.1,
           whichx[bakx[n - c2 + 1]] - 0.1);
    printf("%.10lf %.10lf\n", whichy[c3] + 0.1, whichy[c4] - 0.1);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &xcs, &ycs);
    bakx[i] = xcs;
    baky[i] = ycs;
    point[i] = make_pair(xcs, ycs);
  }
  sort(point + 1, point + n + 1);
  for (int i = 1; i <= 9; i++) scanf("%d", &dat[i]);
  sort(bakx + 1, bakx + n + 1);
  sort(baky + 1, baky + n + 1);
  lsh.clear();
  m1[1] = 1;
  lsh.insert(make_pair(bakx[1], m1[1]));
  for (int i = 2; i <= n; i++) {
    if (bakx[i] != bakx[i - 1])
      m1[i] = m1[i - 1] + 1;
    else
      m1[i] = m1[i - 1];
    whichx[m1[i]] = bakx[i];
    lsh.insert(make_pair(bakx[i], m1[i]));
  }
  for (int i = 1; i <= n; i++) {
    lshg = lsh.find(point[i].first);
    xc[i] = lshg->second;
    lshg = lsh.find(bakx[i]);
    bakx[i] = lshg->second;
  }
  lsh.clear();
  m1[1] = 1;
  lsh.insert(make_pair(baky[1], m1[1]));
  for (int i = 2; i <= n; i++) {
    if (baky[i] != baky[i - 1])
      m1[i] = m1[i - 1] + 1;
    else
      m1[i] = m1[i - 1];
    whichy[m1[i]] = baky[i];
    lsh.insert(make_pair(baky[i], m1[i]));
  }
  for (int i = 1; i <= n; i++) {
    lshg = lsh.find(point[i].second);
    yc[i] = lshg->second;
    lshg = lsh.find(baky[i]);
    baky[i] = lshg->second;
  }
  maketree(root, 1, n);
  for (int i = 0; i <= 9; i++) b[i] = i;
  ttflag = 1;
  while (b[0] == 0) {
    doit();
    if (ttflag == 0) return 0;
    j = 9;
    while (b[j - 1] > b[j]) --j;
    k = 9;
    while (b[j - 1] > b[k]) --k;
    swap(b[j - 1], b[k]);
    for (int p = j; p <= 9; p++)
      for (int q = p + 1; q <= 9; q++)
        if (b[p] > b[q]) swap(b[p], b[q]);
  }
  printf("-1\n");
  return 0;
}