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;
map<long, long> ls;
map<long, long> ls2;
long TOTX, TOTY;
struct mat {
  long x, y;
} data[200000];
bool c2(long a, long b) { return a > b; }
bool cmp(mat a, mat b) {
  if (a.y != b.y) return a.y < b.y;
  return a.x < b.x;
}
long xx[200000], yy[200000];
long n;
bool use[10] = {false};
long a[10];
long cute[10];
bool flag = false;
vector<long> val[200000 * 4];
long checks(long now, long y) {
  long ans, l, r;
  ans = 0;
  l = 1;
  r = val[now].size();
  while (l < r) {
    long mid = (l + r) >> 1;
    if (val[now][mid - 1] <= y) {
      l = mid + 1;
      ans = mid;
    } else
      r = mid;
  }
  if (val[now][l - 1] <= y) ans = l;
  return ans;
}
long asker(long now, long x, long y, long l, long r, long v) {
  if (x <= l && r <= y) {
    return checks(now, v);
  }
  long reu = 0;
  long mid = (l + r) >> 1;
  if (x <= mid) reu += asker(now * 2, x, y, l, mid, v);
  if (y > mid) reu += asker(now * 2 + 1, x, y, mid + 1, r, v);
  return reu;
}
long ask(long x, long y) {
  if (!x || !y) return 0;
  return asker(1, 1, x, 1, TOTX, y);
}
void check() {
  long x1, x2, y1, y2;
  if (yy[cute[a[1]] + cute[a[2]] + cute[a[3]]] ==
      yy[cute[a[1]] + cute[a[2]] + cute[a[3]] + 1])
    return;
  if (xx[cute[a[1]] + cute[a[4]] + cute[a[7]]] ==
      xx[cute[a[1]] + cute[a[4]] + cute[a[7]] + 1])
    return;
  if (yy[cute[a[1]] + cute[a[2]] + cute[a[3]] + cute[a[4]] + cute[a[5]] +
         cute[a[6]]] == yy[cute[a[1]] + cute[a[2]] + cute[a[3]] + cute[a[4]] +
                           cute[a[5]] + cute[a[6]] + 1])
    return;
  if (xx[cute[a[1]] + cute[a[4]] + cute[a[7]] + cute[a[2]] + cute[a[5]] +
         cute[a[8]]] == xx[cute[a[1]] + cute[a[4]] + cute[a[7]] + cute[a[2]] +
                           cute[a[5]] + cute[a[8]] + 1])
    return;
  x1 = xx[cute[a[1]] + cute[a[4]] + cute[a[7]]];
  x2 = xx[cute[a[1]] + cute[a[4]] + cute[a[7]] + cute[a[2]] + cute[a[5]] +
          cute[a[8]]];
  y1 = yy[cute[a[1]] + cute[a[2]] + cute[a[3]]];
  y2 = yy[cute[a[1]] + cute[a[2]] + cute[a[3]] + cute[a[4]] + cute[a[5]] +
          cute[a[6]]];
  long a1, a3, a7, a9;
  a1 = ask(ls[x1], TOTY) - ask(ls[x1], ls2[y1] - 1);
  a3 = n -
       (ask(TOTX, ls2[y1] - 1) + ask(ls[x2], TOTY) - ask(ls[x2], ls2[y1] - 1));
  a7 = ask(ls[x1], ls2[y2] - 1);
  a9 = ask(TOTX, ls2[y2] - 1) - ask(ls[x2], ls2[y2] - 1);
  if (a1 != cute[a[1]]) return;
  if (a3 != cute[a[3]]) return;
  if (a7 != cute[a[7]]) return;
  if (a9 != cute[a[9]]) return;
  flag = true;
  printf("%.2lf %.2lf\n%.2lf %.2lf\n", x1 + 0.5, x2 + 0.5, y1 - 0.5, y2 - 0.5);
}
void read(long &x) {
  bool f = false;
  x = 0;
  char s = getchar();
  while (true) {
    if (s == '-') {
      f = true;
      break;
    }
    if (s <= '9' && s >= '0') break;
  }
  if (s == '-') s = getchar();
  while (s <= '9' && s >= '0') {
    x *= 10;
    x += s - 48;
    s = getchar();
  }
  if (f) x *= -1;
}
void dfs(long step) {
  if (flag) return;
  if (step > 9) {
    check();
    return;
  }
  for (long i = 1; i <= 9; i++)
    if (!use[i]) {
      use[i] = true;
      a[step] = i;
      dfs(step + 1);
      use[i] = false;
    }
}
void insert(long now, long l, long r, long v, long y) {
  if (l == r) {
    val[now].push_back(y);
    return;
  }
  long mid = (l + r) >> 1;
  if (v <= mid)
    insert(now * 2, l, mid, v, y);
  else
    insert(now * 2 + 1, mid + 1, r, v, y);
  val[now].push_back(y);
}
void build(long now, long l, long r) {
  val[now].clear();
  if (l == r) return;
  long mid = (l + r) >> 1;
  build(now * 2, l, mid);
  build(now * 2 + 1, mid + 1, r);
}
int main() {
  read(n);
  for (long i = 1; i <= n; i++) {
    read(data[i].x);
    read(data[i].y);
    xx[i] = data[i].x;
    yy[i] = data[i].y;
  }
  for (long i = 1; i <= 9; i++) read(cute[i]);
  sort(xx + 1, xx + 1 + n);
  sort(yy + 1, yy + 1 + n, c2);
  long tot;
  tot = 0;
  for (long i = 1; i <= n; i++)
    if (i == 1 || xx[i] != xx[i - 1]) {
      tot++;
      ls[xx[i]] = tot;
    }
  TOTX = tot;
  tot = 0;
  for (long i = n; i >= 1; i--)
    if (i == n || yy[i] != yy[i + 1]) {
      tot++;
      ls2[yy[i]] = tot;
    }
  for (long i = 1; i <= n; i++) {
    data[i].x = ls[data[i].x];
    data[i].y = ls2[data[i].y];
  }
  TOTY = tot;
  sort(data + 1, data + 1 + n, cmp);
  build(1, 1, TOTX);
  for (long i = 1; i <= n; i++) {
    insert(1, 1, TOTX, data[i].x, data[i].y);
  }
  for (long i = 1; i <= 9; i++) a[i] = i;
  for (long sss = 1; sss <= 362880; sss++) {
    check();
    if (flag) break;
    next_permutation(a + 1, a + 10);
  }
  if (!flag) printf("-1");
  return 0;
}