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;
inline int read() {
  int x = 0;
  char ch = getchar();
  bool positive = 1;
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') positive = 0;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return positive ? x : -x;
}
const int MaxN = 100005;
const int INF = 1 << 30;
struct node {
  int size;
  node *l, *r;
  void update() { size = l->size + r->size; }
} * root[MaxN], *null;
inline void modify(node*& t, node* f, int l, int r, int x) {
  t = new node;
  t->l = t->r = null;
  if (l == r) {
    t->size = f->size + 1;
    return;
  }
  int mid = l + r >> 1;
  if (x <= mid)
    modify(t->l, f->l, l, mid, x), t->r = f->r;
  else
    modify(t->r, f->r, mid + 1, r, x), t->l = f->l;
  t->update();
}
inline int query(node* t, int l, int r, int ll, int rr) {
  if (l == ll && r == rr || !t->size) return t->size;
  int mid = l + r >> 1;
  if (rr <= mid) return query(t->l, l, mid, ll, rr);
  if (ll > mid) return query(t->r, mid + 1, r, ll, rr);
  return query(t->l, l, mid, ll, mid) + query(t->r, mid + 1, r, mid + 1, rr);
}
struct POINT {
  int x, y;
} a[MaxN];
int N, n, m, b[10], visit[10], c[10];
int tmp[MaxN];
int backx[MaxN], backy[MaxN], sumx[MaxN], sumy[MaxN];
int last[MaxN];
bool cmpx(const int x, const int y) { return a[x].x < a[y].x; }
bool cmpy(const int x, const int y) { return a[x].y < a[y].y; }
inline void prepare() {
  N = read();
  for (int i = 1; i <= N; ++i) a[i].x = read(), a[i].y = read(), tmp[i] = i;
  sort(tmp + 1, tmp + N + 1, cmpx);
  backx[0] = -INF, n = 0;
  for (int i = 1; i <= N; ++i) {
    if (a[tmp[i]].x != backx[n]) backx[++n] = a[tmp[i]].x;
    a[tmp[i]].x = n, sumx[n]++;
  }
  for (int i = 2; i <= n; ++i) sumx[i] += sumx[i - 1];
  sort(tmp + 1, tmp + N + 1, cmpy);
  backy[0] = -INF, m = 0;
  for (int i = 1; i <= N; ++i) {
    if (a[tmp[i]].y != backy[m]) last[m] = i - 1, backy[++m] = a[tmp[i]].y;
    a[tmp[i]].y = m, sumy[m]++;
    modify(root[i], root[i - 1], 1, n, a[tmp[i]].x);
  }
  last[m] = N;
  for (int i = 2; i <= m; ++i) sumy[i] += sumy[i - 1];
}
inline int calc(int x1, int y1, int x2, int y2) {
  return query(root[last[y2]], 1, n, x1 + 1, x2) -
         query(root[last[y1]], 1, n, x1 + 1, x2);
}
inline void work() {
  int x1 = lower_bound(sumx + 1, sumx + n + 1, c[1] + c[2] + c[3]) - sumx;
  int x2 = lower_bound(sumx + 1, sumx + n + 1,
                       c[1] + c[2] + c[3] + c[4] + c[5] + c[6]) -
           sumx;
  int y1 = lower_bound(sumy + 1, sumy + m + 1, c[1] + c[4] + c[7]) - sumy;
  int y2 = lower_bound(sumy + 1, sumy + m + 1,
                       c[1] + c[4] + c[7] + c[2] + c[5] + c[8]) -
           sumy;
  if (calc(0, 0, x1, y1) != c[1]) return;
  if (calc(0, y1, x1, y2) != c[2]) return;
  if (calc(0, y2, x1, m) != c[3]) return;
  if (calc(x1, 0, x2, y1) != c[4]) return;
  if (calc(x1, y1, x2, y2) != c[5]) return;
  if (calc(x1, y2, x2, m) != c[6]) return;
  if (calc(x2, 0, n, y1) != c[7]) return;
  if (calc(x2, y1, n, y2) != c[8]) return;
  if (calc(x2, y2, n, m) != c[9]) return;
  printf("%.1lf %.1lf\n%.1lf %.1lf\n", backx[x1] + 0.5, backx[x2] + 0.5,
         backy[y1] + 0.5, backy[y2] + 0.5);
  exit(0);
}
void DFS(int step) {
  if (step > 9) {
    work();
    return;
  }
  for (int i = 1; i <= 9; ++i)
    if (!visit[i]) {
      c[step] = b[i];
      visit[i] = 1;
      DFS(step + 1);
      visit[i] = 0;
    }
}
int main() {
  null = new node;
  null->size = 0;
  null->l = null->r = null;
  root[0] = null;
  prepare();
  for (int i = 1; i <= 9; ++i) b[i] = read();
  DFS(1);
  printf("-1\n");
  return 0;
}