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;
int n, i, j, k, l, r, u, d;
int a[15], p[15], pp[15], q[100005], sum[100005][2];
bool use[15];
struct node {
  int x, y;
} t[100005];
inline bool cmpx(const node &a, const node &b) { return a.x < b.x; }
inline bool cmpy(const int &a, const int &b) { return t[a].y < t[b].y; }
void dfs2(int x) {
  if (x == 10) {
    u = a[p[1]] + a[p[4]] + a[p[7]];
    d = n - a[p[3]] - a[p[6]] - a[p[9]];
    if (t[q[u]].y == t[q[u + 1]].y) return;
    if (t[q[d]].y == t[q[d + 1]].y) return;
    if (sum[u][0] != a[p[1]]) return;
    if (sum[u][1] != a[p[4]]) return;
    if (sum[d][0] - sum[u][0] != a[p[2]]) return;
    if (sum[d][1] - sum[u][1] != a[p[5]]) return;
    if (sum[n][0] - sum[d][0] != a[p[3]]) return;
    if (sum[n][1] - sum[d][1] != a[p[6]]) return;
    printf("%lf %lf\n", t[l].x + 0.5, t[r].x + 0.5);
    printf("%lf %lf\n", t[q[u]].y + 0.5, t[q[d]].y + 0.5);
    exit(0);
  }
  p[x] = pp[x];
  p[x + 1] = pp[x + 1];
  p[x + 2] = pp[x + 2];
  dfs2(x + 3);
  p[x] = pp[x];
  p[x + 1] = pp[x + 2];
  p[x + 2] = pp[x + 1];
  dfs2(x + 3);
  p[x] = pp[x + 1];
  p[x + 1] = pp[x];
  p[x + 2] = pp[x + 2];
  dfs2(x + 3);
  p[x] = pp[x + 1];
  p[x + 1] = pp[x + 2];
  p[x + 2] = pp[x];
  dfs2(x + 3);
  p[x] = pp[x + 2];
  p[x + 1] = pp[x + 1];
  p[x + 2] = pp[x];
  dfs2(x + 3);
  p[x] = pp[x + 2];
  p[x + 1] = pp[x];
  p[x + 2] = pp[x + 1];
  dfs2(x + 3);
}
void dfs(int x) {
  if (x == 10) {
    int i;
    l = a[p[1]] + a[p[2]] + a[p[3]];
    r = n - a[p[7]] - a[p[8]] - a[p[9]];
    if (t[l].x == t[l + 1].x) return;
    if (t[r].x == t[r + 1].x) return;
    for (i = 1; i <= n; ++i) {
      sum[i][0] = sum[i - 1][0] + (q[i] <= l);
      sum[i][1] = sum[i - 1][1] + (q[i] > l && q[i] <= r);
    }
    for (i = 1; i <= 9; ++i) pp[i] = p[i];
    dfs2(1);
    for (i = 1; i <= 9; ++i) p[i] = pp[i];
    return;
  }
  int i;
  if (x % 3 == 1)
    i = 9;
  else
    i = p[x - 1];
  for (; i >= 1; --i)
    if (!use[i]) {
      use[i] = true;
      p[x] = i;
      dfs(x + 1);
      use[i] = false;
    }
}
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d%d", &t[i].x, &t[i].y), q[i] = i;
  for (i = 1; i <= 9; ++i) scanf("%d", &a[i]);
  sort(t + 1, t + n + 1, cmpx);
  sort(q + 1, q + n + 1, cmpy);
  dfs(1);
  printf("-1\n");
}