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>
const double EPS = 1e-9;
const double PI = acos(-1.0);
const int MAXN = (int)1e5 + 10;
const int INF = (int)1e9 + 10;
using namespace std;
struct segm_tree {
  vector<vector<int> > t;
  int sz;
  segm_tree(){};
  segm_tree(const vector<int>& a) {
    sz = 1;
    while (sz < ((int)(a).size())) sz *= 2;
    t.assign(sz + sz, vector<int>());
    build(1, 0, sz - 1, a);
  }
  void build(int v, int tl, int tr, const vector<int>& a) {
    if (tl == tr) {
      if (tl < ((int)(a).size()))
        t[v].push_back(a[tl]);
      else
        t[v].push_back(INF + 1);
      return;
    }
    int tm = (tl + tr) / 2;
    build(v * 2, tl, tm, a);
    build(v * 2 + 1, tm + 1, tr, a);
    int l = 0;
    int r = 0;
    while (l != ((int)(t[v * 2]).size()) || r != ((int)(t[v * 2 + 1]).size()))
      if (r == ((int)(t[v * 2 + 1]).size()) ||
          (l < ((int)(t[v * 2]).size()) && t[v * 2][l] < t[v * 2 + 1][r]))
        t[v].push_back(t[v * 2][l++]);
      else
        t[v].push_back(t[v * 2 + 1][r++]);
  }
  int get(int v, int tl, int tr, int l, int r, int d, int u) {
    if (r < tl || tr < l) return 0;
    if (l <= tl && tr <= r) {
      int ly = lower_bound(t[v].begin(), t[v].end(), d) - t[v].begin();
      int ry = upper_bound(t[v].begin(), t[v].end(), u) - t[v].begin();
      return max(0, ry - ly);
    }
    int tm = (tl + tr) / 2;
    return get(v * 2, tl, tm, l, r, d, u) +
           get(v * 2 + 1, tm + 1, tr, l, r, d, u);
  }
  int get(int l, int r, int ly, int ry) {
    if (l > r || ly > ry) return 0;
    return get(1, 0, sz - 1, l, r, ly, ry);
  }
};
segm_tree t;
int n;
int a[20];
pair<int, int> xy[MAXN];
vector<int> y;
vector<int> x;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &xy[i].first, &xy[i].second);
  sort(xy, xy + n);
  y.assign(n, 0);
  x.assign(n, 0);
  for (int i = 0; i < n; i++) y[i] = xy[i].second, x[i] = xy[i].first;
  t = segm_tree(y);
  for (int i = 0; i < 9; i++) scanf("%d", &a[i]);
  sort(a, a + 9);
  sort(y.begin(), y.end());
  do {
    int x1 = x[a[0] + a[1] + a[2]];
    x1 = lower_bound(x.begin(), x.end(), x1) - x.begin();
    int x2 = x[a[0] + a[1] + a[2] + a[3] + a[4] + a[5] - 1];
    x2 = upper_bound(x.begin(), x.end(), x2) - x.begin() - 1;
    int qwertyuiopasdfghjklzxcvbnm = y[a[2] + a[5] + a[8]];
    qwertyuiopasdfghjklzxcvbnm =
        y[lower_bound(y.begin(), y.end(), qwertyuiopasdfghjklzxcvbnm) -
          y.begin()];
    int y2 = y[a[2] + a[5] + a[8] + a[1] + a[4] + a[7] - 1];
    y2 = y[upper_bound(y.begin(), y.end(), y2) - y.begin() - 1];
    if (t.get(0, x1 - 1, y2 + 1, INF) != a[0]) continue;
    if (t.get(0, x1 - 1, qwertyuiopasdfghjklzxcvbnm, y2) != a[1]) continue;
    if (t.get(0, x1 - 1, -INF, qwertyuiopasdfghjklzxcvbnm - 1) != a[2])
      continue;
    if (t.get(x1, x2, y2 + 1, INF) != a[3]) continue;
    if (t.get(x1, x2, qwertyuiopasdfghjklzxcvbnm, y2) != a[4]) continue;
    if (t.get(x1, x2, -INF, qwertyuiopasdfghjklzxcvbnm - 1) != a[5]) continue;
    if (t.get(x2 + 1, n - 1, y2 + 1, INF) != a[6]) continue;
    if (t.get(x2 + 1, n - 1, qwertyuiopasdfghjklzxcvbnm, y2) != a[7]) continue;
    if (t.get(x2 + 1, n - 1, -INF, qwertyuiopasdfghjklzxcvbnm - 1) != a[8])
      continue;
    printf("%.10lf %.10lf\n%.10lf %.10lf\n", (double)x[x1] - 0.5,
           (double)x[x2] + 0.5, (double)qwertyuiopasdfghjklzxcvbnm - 0.5,
           (double)y2 + 0.5);
    return 0;
  } while (next_permutation(a, a + 9));
  puts("-1");
  return 0;
}