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;
int x[100010], y[100010];
int p[10];
int x2[100010], y2[100010];
set<int> sx, sy;
vector<int> vx, vy;
int dp[200][200];
map<pair<int, int>, int> mp;
void pre(void) {
  int i, j, k;
  int X = sx.size(), Y = sy.size();
  for (__typeof((sx).begin()) itr = (sx).begin(); itr != (sx).end(); itr++)
    vx.push_back(*itr);
  for (__typeof((sy).begin()) itr = (sy).begin(); itr != (sy).end(); itr++)
    vy.push_back(*itr);
  for ((i) = 0; (i) < (int)(N); (i)++) {
    for ((j) = 0; (j) < (int)(X); (j)++)
      if (vx[j] > 2 * x[i]) break;
    for ((k) = 0; (k) < (int)(Y); (k)++)
      if (vy[k] > 2 * y[i]) break;
    dp[j][k]++;
  }
  for ((i) = 0; (i) < (int)(X); (i)++)
    for ((j) = 0; (j) < (int)(Y); (j)++) {
      if (i > 0) dp[i][j] += dp[i - 1][j];
      if (j > 0) dp[i][j] += dp[i][j - 1];
      if (i > 0 && j > 0) dp[i][j] -= dp[i - 1][j - 1];
      mp[make_pair(vx[i], vy[j])] = dp[i][j];
    }
}
int getx(int s) {
  if (x2[s - 1] == x2[s]) return 2100000000;
  return x2[s - 1] + x2[s];
}
int gety(int s) {
  if (y2[s - 1] == y2[s]) return 2100000000;
  return y2[s - 1] + y2[s];
}
int func(int X, int Y) { return mp[make_pair(X, Y)]; }
int main(void) {
  int i, mask;
  cin >> N;
  for ((i) = 0; (i) < (int)(N); (i)++) scanf("%d%d", &x[i], &y[i]);
  for ((i) = 0; (i) < (int)(9); (i)++) cin >> p[i];
  sort(p, p + 9);
  for ((i) = 0; (i) < (int)(N); (i)++) x2[i] = x[i];
  sort(x2, x2 + N);
  for ((i) = 0; (i) < (int)(N); (i)++) y2[i] = y[i];
  sort(y2, y2 + N);
  for ((mask) = 0; (mask) < (int)((1 << 9)); (mask)++) {
    int cnt = __builtin_popcount(mask);
    if (cnt == 3 || cnt == 6) {
      int sum = 0;
      for ((i) = 0; (i) < (int)(9); (i)++)
        if (mask & (1 << i)) sum += p[i];
      if (x2[sum - 1] != x2[sum]) sx.insert(getx(sum));
      if (y2[sum - 1] != y2[sum]) sy.insert(gety(sum));
    }
  }
  pre();
  do {
    int xL = getx(p[0] + p[1] + p[2]);
    int xR = getx(p[0] + p[1] + p[2] + p[3] + p[4] + p[5]);
    int yL = gety(p[0] + p[3] + p[6]);
    int yR = gety(p[0] + p[3] + p[6] + p[1] + p[4] + p[7]);
    if (sx.find(xL) == sx.end() || sx.find(xR) == sx.end()) continue;
    if (sy.find(yL) == sy.end() || sy.find(yR) == sy.end()) continue;
    if (func(xL, yL) == p[0] && func(xL, yR) == p[0] + p[1] &&
        func(xR, yL) == p[0] + p[3] &&
        func(xR, yR) == p[0] + p[1] + p[3] + p[4]) {
      printf("%.1f %.1f\n%.1f %.1f\n", xL / 2.0, xR / 2.0, yL / 2.0, yR / 2.0);
      return 0;
    }
  } while (next_permutation(p, p + 9));
  cout << -1 << endl;
  return 0;
}