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 N = 1e5 + 10;
int n, nx, ny, tot, a[N];
int x[N], y[N], xx[N], yy[N], t[N];
int use[N], ord[N], sum[N];
int rt[N], tree[N * 40], ch[N * 40][2];
map<int, int> Mpx, Mpy;
pair<int, int> tmp[N];
void Discre() {
  for (int i = 1; i <= n; i++) xx[i] = x[i], yy[i] = y[i];
  sort(xx + 1, xx + n + 1);
  sort(yy + 1, yy + n + 1);
  nx = unique(xx + 1, xx + n + 1) - xx - 1;
  ny = unique(yy + 1, yy + n + 1) - yy - 1;
  for (int i = 1; i <= nx; i++) Mpx[xx[i]] = i;
  for (int i = 1; i <= ny; i++) Mpy[yy[i]] = i;
  for (int i = 1; i <= n; i++) x[i] = Mpx[x[i]];
  for (int i = 1; i <= n; i++) y[i] = Mpy[y[i]];
  for (int i = 1; i <= n; i++) tmp[i] = make_pair(x[i], y[i]);
  sort(tmp + 1, tmp + n + 1);
  for (int i = 1; i <= n; i++) x[i] = tmp[i].first, y[i] = tmp[i].second;
  int now = 1;
  for (int i = 1; i <= n; i++) {
    if (x[i] == now)
      sum[x[i]]++;
    else
      sum[now + 1] = sum[now], now++, i--;
  }
}
int Updata(int las, int l, int r, int pos) {
  int now = ++tot;
  if (l == r) {
    tree[now] = tree[las] + 1;
    return now;
  }
  int mid = (l + r) >> 1;
  if (mid >= pos)
    ch[now][1] = ch[las][1], ch[now][0] = Updata(ch[las][0], l, mid, pos);
  else
    ch[now][0] = ch[las][0], ch[now][1] = Updata(ch[las][1], mid + 1, r, pos);
  tree[now] = tree[ch[now][0]] + tree[ch[now][1]];
  return now;
}
int Query(int x, int l, int r, int ql, int qr) {
  if (ql <= l && r <= qr) return tree[x];
  int mid = (l + r) >> 1, ans = 0;
  if (mid >= ql) ans += Query(ch[x][0], l, mid, ql, qr);
  if (mid < qr) ans += Query(ch[x][1], mid + 1, r, ql, qr);
  return ans;
}
int Find(int x, int l, int r, int val) {
  if (l == r) {
    if (tree[x] == val)
      return l;
    else
      return -1;
  }
  int mid = (l + r) >> 1;
  if (tree[ch[x][0]] >= val)
    return Find(ch[x][0], l, mid, val);
  else
    return Find(ch[x][1], mid + 1, r, val - tree[ch[x][0]]);
}
void check() {
  int s1 = 0, s2 = 0, s3, s4, s5, s6;
  for (int i = 1; i <= 6; i++) {
    if (i <= 3)
      s1 += a[ord[i]], s2 += a[ord[i]];
    else
      s2 += a[ord[i]];
  }
  int x1 = lower_bound(sum + 1, sum + nx + 1, s1) - sum;
  int x2 = lower_bound(sum + 1, sum + nx + 1, s2) - sum;
  if (sum[x1] != s1 || sum[x2] != s2) return;
  s1 = a[ord[1]] + a[ord[4]] + a[ord[7]];
  s2 = s1 + a[ord[2]] + a[ord[5]] + a[ord[8]];
  int y1 = Find(rt[nx], 1, ny, s1);
  if (y1 == -1) return;
  int y2 = Find(rt[nx], 1, ny, s2);
  if (y2 == -1) return;
  s3 = Query(rt[x1], 1, ny, 1, y1);
  if (s3 != a[ord[1]]) return;
  s4 = Query(rt[x2], 1, ny, 1, y1);
  if (s4 != a[ord[1]] + a[ord[4]]) return;
  s5 = Query(rt[x1], 1, ny, 1, y2);
  if (s5 != s3 + a[ord[2]]) return;
  s6 = Query(rt[x2], 1, ny, 1, y2);
  if (s6 != s4 + a[ord[2]] + a[ord[5]]) return;
  printf("%.9lf %.9lf\n%.9lf %.9lf", 0.5 + xx[x1], 0.5 + xx[x2], 0.5 + yy[y1],
         0.5 + yy[y2]);
  exit(0);
}
void dfs(int x) {
  if (x == 10) return check();
  for (int i = 1; i <= 9; i++) {
    if (use[i]) continue;
    use[i] = 1;
    ord[x] = i;
    dfs(x + 1);
    use[i] = 0;
    ord[x] = 0;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int i = 1; i <= 9; i++) scanf("%d", &a[i]);
  Discre();
  for (int i = 1; i <= n; i++) {
    if (x[i] != x[i - 1])
      rt[x[i]] = Updata(rt[x[i - 1]], 1, ny, y[i]);
    else
      rt[x[i]] = Updata(rt[x[i]], 1, ny, y[i]);
  }
  dfs(1);
  puts("-1");
  return 0;
}