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 M = (int)1e5 + 5, MM = M * 20;
int n;
struct W {
  int x, y;
  bool operator<(const W &a) const { return x < a.x; }
} Pt[M];
int Rt[M];
int plx[M], xsz, ply[M], ysz;
int A[10];
int Lson[MM], Rson[MM], val[MM], tot;
void update(int L, int R, int &p, int op, int x, int v) {
  p = ++tot;
  Lson[p] = Lson[op];
  Rson[p] = Rson[op];
  val[p] = val[op] + v;
  if (L == R) return;
  int mid = (L + R) >> 1;
  if (mid >= x)
    update(L, mid, Lson[p], Lson[op], x, v);
  else
    update(mid + 1, R, Rson[p], Rson[op], x, v);
}
int mark[10];
int a[10];
int query(int L, int R, int p, int v) {
  if (p == 0) return -1;
  if (val[p] < v) return -1;
  if (L == R) {
    if (val[p] == v) return L;
    return -1;
  }
  int mid = (L + R) >> 1;
  if (val[Lson[p]] < v)
    return query(mid + 1, R, Rson[p], v - val[Lson[p]]);
  else
    return query(L, mid, Lson[p], v);
}
int query(int L, int R, int p, int l, int r) {
  if (p == 0) return 0;
  if (L == l && R == r) return val[p];
  int mid = (L + R) >> 1;
  if (mid >= r)
    return query(L, mid, Lson[p], l, r);
  else if (mid < l)
    return query(mid + 1, R, Rson[p], l, r);
  else
    return query(L, mid, Lson[p], l, mid) +
           query(mid + 1, R, Rson[p], mid + 1, r);
}
void dfs(int x) {
  if (x == 10) {
    int s1 = A[a[1]] + A[a[4]] + A[a[7]], s2 = s1 + A[a[2]] + A[a[5]] + A[a[8]];
    int L = 1, R = xsz, mid, ansx1 = -1, ansx2 = -1;
    while (L <= R) {
      mid = (L + R) >> 1;
      if (val[Rt[mid]] > s1)
        R = mid - 1;
      else if (val[Rt[mid]] < s1)
        L = mid + 1;
      else {
        ansx1 = mid;
        break;
      }
    }
    if (ansx1 == -1) return;
    L = 1, R = xsz;
    while (L <= R) {
      mid = (L + R) >> 1;
      if (val[Rt[mid]] > s2)
        R = mid - 1;
      else if (val[Rt[mid]] < s2)
        L = mid + 1;
      else {
        ansx2 = mid;
        break;
      }
    }
    if (ansx2 == -1) return;
    int ansy11 = query(1, ysz, Rt[ansx1], A[a[1]]);
    int ansy12 = query(1, ysz, Rt[ansx2], A[a[1]] + A[a[2]]);
    int ansy13 = query(1, ysz, Rt[xsz], A[a[1]] + A[a[2]] + A[a[3]]);
    int ansy21 = query(1, ysz, Rt[ansx1], A[a[1]] + A[a[4]]);
    int ansy22 =
        query(1, ysz, Rt[ansx2], A[a[1]] + A[a[2]] + A[a[4]] + A[a[5]]);
    int ansy23 =
        query(1, ysz, Rt[xsz],
              A[a[1]] + A[a[2]] + A[a[3]] + A[a[4]] + A[a[5]] + A[a[6]]);
    int mxansy1 = max(ansy11, max(ansy12, ansy13));
    int mxansy2 = max(ansy21, max(ansy22, ansy23));
    if (query(1, ysz, Rt[ansx1], 1, mxansy1) != A[a[1]]) return;
    if (query(1, ysz, Rt[ansx2], 1, mxansy1) != A[a[1]] + A[a[2]]) return;
    if (query(1, ysz, Rt[xsz], 1, mxansy1) != A[a[1]] + A[a[2]] + A[a[3]])
      return;
    if (query(1, ysz, Rt[ansx1], 1, mxansy2) != A[a[1]] + A[a[4]]) return;
    if (query(1, ysz, Rt[ansx2], 1, mxansy2) !=
        A[a[1]] + A[a[2]] + A[a[4]] + A[a[5]])
      return;
    if (query(1, ysz, Rt[xsz], 1, mxansy2) !=
        A[a[1]] + A[a[2]] + A[a[3]] + A[a[4]] + A[a[5]] + A[a[6]])
      return;
    if (ansx1 == ansx2)
      printf("%.10f %.10f\n", plx[ansx1 - 1] + 0.01, plx[ansx2 - 1] + 0.09);
    else
      printf("%.10f %.10f\n", plx[ansx1 - 1] + 0.05, plx[ansx2 - 1] + 0.05);
    if (mxansy1 == mxansy2)
      printf("%.10f %.10f\n", ply[mxansy1 - 1] + 0.01, ply[mxansy2 - 1] + 0.09);
    else
      printf("%.10f %.10f\n", ply[mxansy1 - 1] + 0.05, ply[mxansy2 - 1] + 0.05);
    exit(0);
    return;
  }
  for (int i = 1; i <= 9; i++)
    if (mark[i] == 0) {
      mark[i] = 1;
      a[x] = i;
      dfs(x + 1);
      mark[i] = 0;
    }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &Pt[i].x, &Pt[i].y);
    plx[xsz++] = Pt[i].x, ply[ysz++] = Pt[i].y;
  }
  sort(Pt + 1, Pt + n + 1);
  sort(plx, plx + xsz), xsz = unique(plx, plx + xsz) - plx;
  sort(ply, ply + ysz), ysz = unique(ply, ply + ysz) - ply;
  for (int i = 1, j = 1, y; i <= xsz; i++) {
    Rt[i] = Rt[i - 1];
    while (j <= n && Pt[j].x == plx[i - 1]) {
      y = lower_bound(ply, ply + ysz, Pt[j].y) - ply + 1;
      update(1, ysz, Rt[i], Rt[i], y, 1);
      j++;
    }
  }
  for (int i = 1; i <= 9; i++) scanf("%d", &A[i]);
  dfs(1);
  puts("-1");
  return 0;
}