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;
int m, n;
int s[10];
vector<int> v[3 * 100050];
struct ele {
  int x, y;
} city[100050], c2[100050];
bool cmpx(ele c, ele d) { return c.x < d.x; }
bool cmpy(ele c, ele d) { return c.y < d.y; }
void merge(int a, int b, int c) {
  int p = 0, q = 0;
  while (p < v[a].size() || q < v[b].size()) {
    if (p < v[a].size() && (q >= v[b].size() || v[a][p] < v[b][q])) {
      v[c].push_back(v[a][p]);
      p++;
    } else {
      v[c].push_back(v[b][q]);
      q++;
    }
  }
}
void build(int l, int r, int idx) {
  int mid = (r + l) / 2;
  if (l == r) {
    v[idx].push_back(city[l].y);
    return;
  }
  build(l, mid, 2 * idx);
  build(mid + 1, r, 2 * idx + 1);
  merge(2 * idx, 2 * idx + 1, idx);
}
int bs(int y, int idx) {
  int l = 0, r = v[idx].size() - 1;
  if (y <= v[idx][l]) return l;
  if (y > v[idx][r]) return r + 1;
  while (1) {
    int mid = (r + l) / 2;
    if (r - l <= 2) {
      for (int i = l; i <= r; i++) {
        if (y <= v[idx][i]) return i;
      }
    }
    if (y > v[idx][mid])
      l = mid;
    else
      r = mid;
  }
}
int bs2(int y, int idx) {
  int l = 0, r = v[idx].size() - 1;
  if (y < v[idx][l]) return -1;
  if (y >= v[idx][r]) return r;
  while (1) {
    int mid = (r + l) / 2;
    if (r - l <= 2) {
      for (int i = l; i <= r; i++) {
        if (y < v[idx][i + 1]) return i;
      }
    }
    if (y >= v[idx][mid])
      l = mid;
    else
      r = mid;
  }
}
int find(int l, int r, int x1, int x2, int y1, int y2, int idx) {
  int mid = (l + r) / 2, x, y;
  if (r < x1 || x2 < l) return 0;
  if (x1 <= l && r <= x2) {
    x = bs(c2[y1].y, idx);
    y = bs2(c2[y2].y, idx);
    return y - x + 1;
  }
  return find(l, mid, x1, x2, y1, y2, 2 * idx) +
         find(mid + 1, r, x1, x2, y1, y2, 2 * idx + 1);
}
int main() {
  int i, j, k, x, y, z, x1, x2, y1, y2, ans;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &city[i].x, &city[i].y);
    c2[i] = city[i];
  }
  sort(city + 1, city + 1 + n, cmpx);
  sort(c2 + 1, c2 + 1 + n, cmpy);
  build(1, n, 1);
  for (i = 1; i <= 9; i++) scanf("%d", &s[i]);
  bool yes = 0;
  for (i = 1; i <= 362880; i++) {
    next_permutation(s + 1, s + 10);
    x1 = s[1] + s[4] + s[7];
    x2 = n - s[3] - s[6] - s[9];
    if (city[x1].x == city[x1 + 1].x || city[x2].x == city[x2 + 1].x) continue;
    y1 = s[1] + s[2] + s[3];
    y2 = n - s[7] - s[8] - s[9];
    if (c2[y1].y == c2[y1 + 1].y || c2[y2].y == c2[y2 + 1].y) continue;
    if (find(1, n, 1, x1, 1, y1, 1) == s[1] &&
        find(1, n, x1 + 1, x2, 1, y1, 1) == s[2] &&
        find(1, n, 1, x1, y1 + 1, y2, 1) == s[4] &&
        find(1, n, x1 + 1, x2, y1 + 1, y2, 1) == s[5]) {
      yes = 1;
      break;
    }
  }
  if (yes)
    printf("%lf %lf\n%lf %lf\n", (double)city[x1].x + 0.5,
           (double)city[x2].x + 0.5, (double)c2[y1].y + 0.5,
           (double)c2[y2].y + 0.5);
  else
    puts("-1");
  getchar();
  getchar();
}