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 tope = 100001;
int x[tope];
pair<int, int> yx[tope];
int y[3][tope];
int len[3];
int n;
int a[9];
int asig[3][3];
int p[3][3];
double solx0, solx1, soly0, soly1;
void iniperm(int p[3]) {
  for (int i = 0; i < 3; i++) p[i] = i;
}
void check() {
  for (int i = 0; i < 3; i++) {
    if (y[i][a[asig[i][p[i][0]]] - 1] == y[i][a[asig[i][p[i][0]]]]) return;
    if (y[i][a[asig[i][p[i][0]]] + a[asig[i][p[i][1]]] - 1] ==
        y[i][a[asig[i][p[i][0]]] + a[asig[i][p[i][1]]]])
      return;
  }
  int inf0 = -2000000000, sup0 = 2000000000;
  for (int i = 0; i < 3; i++) {
    inf0 = max(inf0, y[i][a[asig[i][p[i][0]]] - 1]);
    sup0 = min(sup0, y[i][a[asig[i][p[i][0]]]]);
  }
  if (inf0 >= sup0) return;
  int inf1 = -2000000000, sup1 = 2000000000;
  for (int i = 0; i < 3; i++) {
    inf1 = max(inf1, y[i][a[asig[i][p[i][0]]] + a[asig[i][p[i][1]]] - 1]);
    sup1 = min(sup1, y[i][a[asig[i][p[i][0]]] + a[asig[i][p[i][1]]]]);
  }
  if (inf1 >= sup1) return;
  soly0 = inf0 + 0.5;
  soly1 = inf1 + 0.5;
  cout << solx0 << " " << solx1 << endl;
  cout << soly0 << " " << soly1 << endl;
  exit(0);
}
void chequea() {
  iniperm(p[0]);
  do {
    iniperm(p[1]);
    do {
      iniperm(p[2]);
      do {
        check();
      } while (next_permutation(p[2], p[2] + 3));
    } while (next_permutation(p[1], p[1] + 3));
  } while (next_permutation(p[0], p[0] + 3));
}
int main() {
  cout.setf(ios::fixed);
  cout.precision(10);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> yx[i].second >> yx[i].first;
    x[i] = yx[i].second;
  }
  for (int i = 0; i < 9; i++) cin >> a[i];
  sort(x, x + n);
  sort(yx, yx + n);
  int e = 1;
  for (int i = 0; i < 9; i++) e *= 3;
  for (int c = 0; c < e; c++) {
    int cc = c;
    int index[3];
    for (int i = 0; i < 3; i++) index[i] = 0;
    bool error = false;
    for (int i = 0; i < 9; i++) {
      if (index[cc % 3] == 3) {
        error = true;
        break;
      }
      asig[cc % 3][index[cc % 3]++] = i;
      cc /= 3;
    }
    if (not error) {
      int amount[3];
      for (int i = 0; i < 3; i++)
        amount[i] = a[asig[i][0]] + a[asig[i][1]] + a[asig[i][2]];
      if (x[amount[0] - 1] != x[amount[0]] and
          x[amount[0] + amount[1] - 1] != x[amount[0] + amount[1]]) {
        int x0 = x[amount[0] - 1];
        solx0 = x0 + 0.5;
        int x1 = x[amount[0] + amount[1] - 1];
        solx1 = x1 + 0.5;
        for (int i = 0; i < 3; i++) len[i] = 0;
        for (int i = 0; i < n; i++) {
          if (yx[i].second <= x0)
            y[0][len[0]++] = yx[i].first;
          else if (yx[i].second <= x1)
            y[1][len[1]++] = yx[i].first;
          else
            y[2][len[2]++] = yx[i].first;
        }
        chequea();
      }
    }
  }
  cout << -1 << endl;
}