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;
vector<int> t[4 * 100100], ai[2][100100];
int query(int root, int rl, int rr, int a, int b, int x) {
  if (b < a) return 0;
  if (a == rl && b == rr)
    return upper_bound(t[root].begin(), t[root].end(), x) - t[root].begin();
  int rm = (rl + rr) / 2;
  return query(2 * root + 1, rl, rm, a, min(b, rm), x) +
         query(2 * root + 2, rm + 1, rr, max(a, rm + 1), b, x);
}
void init(int root, int rl, int rr) {
  if (rl == rr)
    t[root] = ai[0][rl];
  else {
    int rm = (rl + rr) / 2;
    init(2 * root + 1, rl, rm);
    init(2 * root + 2, rm + 1, rr);
    t[root] = vector<int>(t[2 * root + 1].size() + t[2 * root + 2].size());
    merge(t[2 * root + 1].begin(), t[2 * root + 1].end(),
          t[2 * root + 2].begin(), t[2 * root + 2].end(), t[root].begin());
  }
}
vector<int> ids[2];
int gxid(int k, int x) {
  return lower_bound(ids[k].begin(), ids[k].end(), x) - ids[k].begin();
}
int s[2][3], qids[2], sai[2][100100];
int v[100100][2], a[10];
bool flines(int k, int &xa, int &xb) {
  int es0 = 1, di0 = qids[k];
  while (di0 > es0) {
    int me = (es0 + di0) / 2;
    if (sai[k][me] >= s[k][0])
      di0 = me;
    else
      es0 = me + 1;
  }
  int es1 = es0 + 1, di1 = qids[k];
  while (di1 > es1) {
    int me = (es1 + di1) / 2;
    if (sai[k][me] - sai[k][es0] >= s[k][1])
      di1 = me;
    else
      es1 = me + 1;
  }
  if (sai[k][es0] != s[k][0] || sai[k][es1] - sai[k][es0] != s[k][1]) return 0;
  xa = es0 - 1;
  xb = es1 - 1;
  return 1;
}
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    for (int k = 0; k < (int)2; k++) ids[k].clear();
    for (int i = 0; i < (int)n; i++)
      for (int k = 0; k < (int)2; k++) {
        scanf("%d", &v[i][k]);
        ids[k].push_back(v[i][k]);
      }
    for (int k = 0; k < (int)2; k++) {
      sort(ids[k].begin(), ids[k].end());
      ids[k].resize(unique(ids[k].begin(), ids[k].end()) - ids[k].begin());
      qids[k] = ids[k].size();
    }
    for (int k = 0; k < (int)2; k++) {
      for (int i = 0; i < (int)qids[k]; i++) ai[k][i].clear();
      for (int i = 0; i < (int)n; i++)
        ai[k][gxid(k, v[i][k])].push_back(gxid(1 - k, v[i][1 - k]));
      for (int i = 0; i < (int)qids[k]; i++) {
        sort(ai[k][i].begin(), ai[k][i].end());
        sai[k][i + 1] = sai[k][i] + ai[k][i].size();
      }
    }
    init(0, 0, qids[0] - 1);
    for (int i = 0; i < (int)9; i++) scanf("%d", &a[i]);
    sort(a, a + 9);
    bool ok = 0;
    do {
      for (int i = 0; i < (int)3; i++) {
        s[0][i] = s[1][i] = 0;
        for (int j = 0; j < (int)3; j++) s[0][i] += a[i + 3 * j];
        for (int j = 0; j < (int)3; j++) s[1][i] += a[i * 3 + j];
      }
      if (a[0] == 1 && a[1] == 2 && a[2] == 2 && a[3] == 1 && a[4] == 2 &&
          a[5] == 2 && a[6] == 1 && a[7] == 3)
        ok = 0;
      int xa, xb, ya, yb;
      if (!flines(0, xa, xb) || !flines(1, ya, yb)) continue;
      int p[6];
      p[0] = query(0, 0, qids[0] - 1, 0, xa, ya);
      p[1] = query(0, 0, qids[0] - 1, xa + 1, xb, ya);
      p[2] = query(0, 0, qids[0] - 1, xb + 1, qids[0] - 1, ya);
      p[3] = query(0, 0, qids[0] - 1, 0, xa, yb) - p[0];
      p[4] = query(0, 0, qids[0] - 1, xa + 1, xb, yb) - p[1];
      p[5] = query(0, 0, qids[0] - 1, xb + 1, qids[0] - 1, yb) - p[2];
      ok = 1;
      for (int i = 0; i < (int)6; i++)
        if (p[i] != a[i]) ok = 0;
      if (ok) {
        printf("%lf %lf\n%lf %lf\n", ids[0][xa] + 0.5, ids[0][xb] + 0.5,
               ids[1][ya] + 0.5, ids[1][yb] + 0.5);
        break;
      }
    } while (next_permutation(a, a + 9));
    if (!ok) printf("-1\n");
  }
  return 0;
}