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 n;
const int maxn = 202020;
int a[11];
int s1[maxn], s2[maxn];
long long xx[maxn], yy[maxn];
struct Noode {
  int x, y;
  Noode() {}
  Noode(int _x, int _y) {
    x = _x;
    y = _y;
  }
};
bool cmp1(const Noode &a, const Noode &b) {
  if (a.x == b.x) return a.y < b.y;
  return a.x < b.x;
}
bool cmp2(const Noode &a, const Noode &b) { return a.y < b.y; }
Noode s[maxn];
int cnt1, cnt2;
int zb;
long long prex[maxn];
long long xxx[maxn];
int b[10];
vector<int> c[maxn];
int zb2;
int lowbit(int x) { return x & -x; }
void add(int pos, int v) {
  while (pos <= zb2) {
    c[pos].push_back(v);
    pos += lowbit(pos);
  }
}
int get(int x, int y) {
  int ret = 0;
  while (x) {
    int get = lower_bound(c[x].begin(), c[x].end(), y) - c[x].begin();
    ret += get;
    x -= lowbit(x);
  }
  return ret;
}
void init() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> s[i].x >> s[i].y;
    s[i].x *= 2;
    s[i].y *= 2;
  }
  for (int i = 1; i <= 9; i++) cin >> a[i];
  sort(s + 1, s + 1 + n, cmp1);
  int pre = 1;
  for (int i = 1; i <= n; i++)
    if (s[i].x != s[i + 1].x) {
      zb += 2;
      prex[zb] = s[i].x;
      for (int j = pre; j <= i; j++) s[j].x = zb;
      pre = i + 1;
    }
  zb2 = zb / 2;
  for (int i = 1; i < n; i++)
    if (s[i].x != s[i + 1].x) {
      xx[++cnt1] = (1LL * s[i + 1].x + s[i].x) / 2;
      xxx[cnt1] = (1LL * prex[s[i + 1].x] + prex[s[i].x]) / 2;
    }
  int j = 0;
  for (int i = 1; i <= cnt1; i++) {
    while (j < n && s[j + 1].x < xx[i]) j++;
    s1[i] = j;
  }
  sort(s + 1, s + 1 + n, cmp2);
  for (int i = 1; i < n; i++)
    if (s[i].y != s[i + 1].y) yy[++cnt2] = (1LL * s[i + 1].y + s[i].y) / 2;
  for (int i = 1; i <= n; i++) add(s[i].x / 2, s[i].y);
  j = 0;
  for (int i = 1; i <= cnt2; i++) {
    while (j < n && s[j + 1].y < yy[i]) j++;
    s2[i] = j;
  }
  sort(s + 1, s + 1 + n, cmp1);
}
bool check(int x1, int x2, int y1, int y2) {
  b[1] = get(x1 / 2, y1);
  b[2] = get(x2 / 2, y1) - b[1];
  b[4] = get(x1 / 2, y2) - b[1];
  b[5] = get(x2 / 2, y2) - b[1] - b[2] - b[4];
  return b[1] == a[1] && b[2] == a[2] && b[4] == a[4] && b[5] == a[5];
}
void work() {
  sort(a + 1, a + 1 + 9);
  do {
    int x1 = -1, x2 = -1, y1 = -1, y2 = -1;
    int need1 = a[1] + a[4] + a[7];
    int need2 = need1 + a[2] + a[5] + a[8];
    int l = 1, r = cnt1, mid;
    while (l <= r) {
      mid = (l + r) / 2;
      if (s1[mid] < need1)
        l = mid + 1;
      else if (s1[mid] > need1)
        r = mid - 1;
      else {
        x1 = mid;
        break;
      }
    }
    if (x1 == -1) continue;
    l = x1 + 1, r = cnt1;
    while (l <= r) {
      mid = (l + r) / 2;
      if (s1[mid] < need2)
        l = mid + 1;
      else if (s1[mid] > need2)
        r = mid - 1;
      else {
        x2 = mid;
        break;
      }
    }
    if (x2 == -1) continue;
    need1 = a[1] + a[2] + a[3];
    need2 = need1 + a[4] + a[5] + a[6];
    l = 1, r = cnt2;
    while (l <= r) {
      mid = (l + r) / 2;
      if (s2[mid] < need1)
        l = mid + 1;
      else if (s2[mid] > need1)
        r = mid - 1;
      else {
        y1 = mid;
        break;
      }
    }
    if (y1 == -1) continue;
    l = y1 + 1, r = cnt2;
    while (l <= r) {
      mid = (l + r) / 2;
      if (s2[mid] < need2)
        l = mid + 1;
      else if (s2[mid] > need2)
        r = mid - 1;
      else {
        y2 = mid;
        break;
      }
    }
    if (y2 == -1) continue;
    if (x1 == x2) continue;
    if (y1 == y2) continue;
    if (!check(xx[x1], xx[x2], yy[y1], yy[y2])) continue;
    cout << fixed << setprecision(10) << xxx[x1] / 2.0 << " " << xxx[x2] / 2.0
         << endl
         << yy[y1] / 2.0 << " " << yy[y2] / 2.0 << endl;
    return;
  } while (next_permutation(a + 1, a + 1 + 9));
  cout << -1 << endl;
}
int main() {
  init();
  work();
  return 0;
}