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 n1 = 100010, inf = 2147483647, n2 = 2000000;
struct ww {
  int a, b;
} e[n1];
struct w1 {
  int l, ll, a, s, key;
} h[n2];
int i, j, k, n, m, x, y, s, tot;
int b[n1], a[10], f[10], c[10], f1[n1], f2[n1], f3[n1], f4[n1], an[10],
    root[n1];
inline void right(int x) {
  int y = h[x].a, z = h[y].a;
  if (h[z].l == y)
    h[z].l = x;
  else
    h[z].ll = x;
  h[x].a = z;
  h[y].a = x;
  h[y].l = h[x].ll;
  h[x].ll = h[h[y].l].a = y;
  h[y].s = h[h[y].l].s + h[h[y].ll].s + 1;
}
inline void left(int x) {
  int y = h[x].a, z = h[y].a;
  if (h[z].l == y)
    h[z].l = x;
  else
    h[z].ll = x;
  h[x].a = z;
  h[y].a = x;
  h[y].ll = h[x].l;
  h[x].l = h[h[y].ll].a = y;
  h[y].s = h[h[y].l].s + h[h[y].ll].s + 1;
}
inline void spl(int x, int t) {
  int y, z;
  for (; h[x].a;) {
    y = h[x].a;
    z = h[y].a;
    if (z)
      if (h[z].l == y)
        if (h[y].l == x)
          right(x), right(x);
        else
          left(x), right(x);
      else if (h[y].l == x)
        right(x), left(x);
      else
        left(x), left(x);
    else if (h[y].l == x)
      right(x);
    else
      left(x);
  }
  h[x].s = h[h[x].l].s + h[h[x].ll].s + 1;
  root[t] = x;
}
inline int find(int x) {
  int l = 1, ll = n, mid;
  for (; l <= ll;) {
    mid = (l + ll) / 2;
    if (b[mid] == x) return mid;
    if (b[mid] > x)
      ll = mid - 1;
    else
      l = mid + 1;
  }
}
inline void calc(int x, int y, int &z) {
  int t = root[x], v = 0;
  for (; t;) {
    if (h[t].key <= y)
      v = t, t = h[t].ll;
    else
      t = h[t].l;
  }
  if (!v) return;
  spl(v, x);
  z += h[h[v].l].s + 1;
}
void dfs(int x) {
  if (x > 8) {
    int X, Y, x, y, k;
    x = f1[a[c[0]] + a[c[1]] + a[c[2]]];
    X = f2[a[c[6]] + a[c[7]] + a[c[8]]];
    y = f3[a[c[0]] + a[c[3]] + a[c[6]]];
    Y = f4[a[c[2]] + a[c[5]] + a[c[8]]];
    if (x == inf || y == inf || X == inf || Y == inf) return;
    memset(an, 0, sizeof(an));
    for (k = find(x); k; k -= k & -k) {
      calc(k, y, an[0]);
      calc(k, Y - 1, an[1]);
      calc(k, inf, an[2]);
    }
    an[2] -= an[1];
    an[1] -= an[0];
    if (an[0] != a[c[0]] || an[1] != a[c[1]] || an[2] != a[c[2]]) return;
    for (k = find(X) - 1; k; k -= k & -k) {
      calc(k, y, an[3]);
      calc(k, Y - 1, an[4]);
      calc(k, inf, an[5]);
    }
    an[5] -= an[4];
    an[4] -= an[3];
    for (k = n; k; k -= k & -k) {
      calc(k, y, an[6]);
      calc(k, Y - 1, an[7]);
      calc(k, inf, an[8]);
    }
    an[8] -= an[7];
    an[7] -= an[6];
    an[6] -= an[3];
    an[7] -= an[4];
    an[8] -= an[5];
    an[3] -= an[0];
    an[4] -= an[1];
    an[5] -= an[2];
    if (an[3] != a[c[3]] || an[4] != a[c[4]] || an[5] != a[c[5]]) return;
    if (an[6] != a[c[6]] || an[7] != a[c[7]] || an[8] != a[c[8]]) return;
    printf("%lf %lf\n%lf %lf", double(x + 1) / 2, double(X - 1) / 2,
           double(y + 1) / 2, double(Y - 1) / 2);
    exit(0);
  }
  for (int i = 0; i < 9; i++)
    if (!f[i]) {
      f[i] = 1;
      c[x] = i;
      dfs(x + 1);
      f[i] = 0;
    }
}
inline bool cc1(const ww &a, const ww &b) { return a.a < b.a; }
inline bool cc2(const ww &a, const ww &b) { return a.b < b.b; }
inline void incrase(int x, int y) {
  int t = root[x], v;
  if (!t) {
    root[x] = ++tot;
    h[tot].key = y;
    h[tot].s = 1;
    return;
  }
  for (; t;) {
    v = t;
    if (h[t].key > y)
      t = h[t].l;
    else
      t = h[t].ll;
  }
  t = ++tot;
  h[t].a = v;
  h[t].key = y;
  if (h[v].key > y)
    h[v].l = t;
  else
    h[v].ll = t;
  spl(t, x);
}
inline void read(int &x) {
  char p = getchar();
  int f = 1;
  for (; p < '0' || p > '9'; p = getchar())
    if (p == '-') f = -1;
  for (x = 0; p >= '0' && p <= '9'; x = x * 10 + p - 48, p = getchar())
    ;
  x *= f;
}
int main() {
  read(n);
  for (i = 1; i <= n; i++) {
    read(e[i].a), read(e[i].b);
    e[i].a <<= 1;
    e[i].b <<= 1;
    b[i] = e[i].a;
  }
  for (i = 0; i < 9; i++) read(a[i]);
  sort(b + 1, b + n + 1);
  for (i = 1; i <= n; i++)
    for (k = find(e[i].a); k <= n; k += k & -k) incrase(k, e[i].b);
  for (i = 1; i <= n; i++) f1[i] = f2[i] = f3[i] = f4[i] = inf;
  sort(e + 1, e + n + 1, cc1);
  for (i = 1; i <= n;) {
    for (k = i; i <= n && e[i].a == e[k].a; i++)
      ;
    f1[i - 1] = e[k].a;
  }
  for (i = n; i;) {
    for (k = i; i && e[i].a == e[k].a; i--)
      ;
    f2[n - i] = e[k].a;
  }
  sort(e + 1, e + n + 1, cc2);
  for (i = 1; i <= n;) {
    for (k = i; i <= n && e[i].b == e[k].b; i++)
      ;
    f3[i - 1] = e[k].b;
  }
  for (i = n; i;) {
    for (k = i; i && e[i].b == e[k].b; i--)
      ;
    f4[n - i] = e[k].b;
  }
  dfs(0);
  printf("-1");
}