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;
const int max_n = 4 * 100000;
long long arr[10];
pair<long long, long long> point[max_n];
long long point_x[max_n];
long long point_y[max_n];
long long sum_x[3];
long long sum_y[3];
vector<long long> tree[max_n];
int l1x, l2x, l1y, l2y;
void build_tree(int node, int a, int b) {
  if (a >= b) return;
  if (a == b - 1) {
    tree[node].push_back(point[a].second);
    return;
  }
  int mid = (a + b) / 2;
  build_tree(2 * node, a, mid);
  build_tree(2 * node + 1, mid, b);
  int p1 = a;
  int p2 = mid;
  while (p1 < mid || p2 < b) {
    if (p1 == mid) {
      tree[node].push_back(tree[2 * node + 1][p2 - mid]);
      p2++;
    } else if (p2 == b) {
      tree[node].push_back(tree[2 * node][p1 - a]);
      p1++;
    } else if (tree[2 * node][p1 - a] < tree[2 * node + 1][p2 - mid]) {
      tree[node].push_back(tree[2 * node][p1 - a]);
      p1++;
    } else {
      tree[node].push_back(tree[2 * node + 1][p2 - mid]);
      p2++;
    }
  }
}
int get(int node, int a, int b, int i, int j, long long val) {
  if (a >= b || a >= j || b <= i) return 0;
  if (a >= i && b <= j)
    return upper_bound(tree[node].begin(), tree[node].end(), val) -
           tree[node].begin();
  int mid = (a + b) / 2;
  int g1 = get(2 * node, a, mid, i, j, val);
  int g2 = get(2 * node + 1, mid, b, i, j, val);
  return g1 + g2;
}
bool find_the_ans() {
  int sum1 = arr[1] + arr[4] + arr[7], sum2 = sum1 + arr[2] + arr[5] + arr[8],
      sum3 = arr[1] + arr[2] + arr[3], sum4 = sum3 + arr[4] + arr[5] + arr[6];
  l1x = point_x[sum1];
  l2x = point_x[sum2];
  l1y = point_y[sum3];
  l2y = point_y[sum4];
  if (l1x == point_x[sum1 + 1] || l2x == point_x[sum2 + 1] ||
      l1y == point_y[sum3 + 1] || l2y == point_y[sum4 + 1])
    return false;
  int res1 = arr[1];
  int res2 = arr[1] + arr[2];
  int res3 = res2 + arr[4] + arr[5];
  int res4 = arr[1] + arr[4];
  if (get(1, 1, n + 1, 1, sum1 + 1, l1y) != res1 ||
      get(1, 1, n + 1, 1, sum2 + 1, l1y) != res2 ||
      get(1, 1, n + 1, 1, sum2 + 1, l2y) != res3 ||
      get(1, 1, n + 1, 1, sum1 + 1, l2y) != res4)
    return false;
  return true;
}
int main() {
  cout << fixed << setprecision((5));
  cin >> n;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    cin >> point[i].first >> point[i].second;
    point_x[i] = point[i].first;
    point_y[i] = point[i].second;
  }
  sort(point + 1, point + n + 1);
  sort(point_x + 1, point_x + n + 1);
  sort(point_y + 1, point_y + n + 1);
  build_tree(1, 1, n + 1);
  for (int i = 1; i < 10; i++) cin >> arr[i];
  sort(arr + 1, arr + 10);
  while (1) {
    if (find_the_ans()) {
      long double ans1 = (long double)l1x + (long double)0.5;
      long double ans2 = (long double)l2x + (long double)0.5;
      long double ans3 = (long double)l1y + (long double)0.5;
      long double ans4 = (long double)l2y + (long double)0.5;
      cout << ans1 << ' ' << ans2 << endl;
      cout << ans3 << ' ' << ans4 << endl;
      return 0;
    }
    if (next_permutation(arr + 1, arr + 10))
      continue;
    else
      break;
  }
  cout << -1 << endl;
  return 0;
}