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 std::vector;
const int INF = 1000000000;
struct Point {
  int x, y;
  Point() : x(0), y(0) {}
  Point(int x, int y) : x(x), y(y) {}
};
bool by_x(const Point &a, const Point &b) { return a.x < b.x; }
bool by_y(const Point &a, const Point &b) { return a.y < b.y; }
const int N = 100000;
int n, a[9];
Point point[N], point_by_x[N], point_by_y[N];
int get_middle(int low, int high) {
  int middle = low + high;
  if (middle % 2) {
    middle--;
  }
  return middle / 2;
}
struct Node {
  int count;
  Node *left, *right;
  Node(int count, Node *left, Node *right)
      : count(count), left(left), right(right) {}
  Node *insert(int, int, int);
  int query(int, int, int);
};
Node *null;
Node *Node::insert(int l, int r, int k) {
  if (k < l || r < k) {
    return this;
  }
  if (l == r) {
    return new Node(count + 1, null, null);
  }
  int m = get_middle(l, r);
  return new Node(count + 1, left->insert(l, m, k), right->insert(m + 1, r, k));
}
int Node::query(int l, int r, int k) {
  if (this == null || k <= l) {
    return 0;
  }
  if (r < k) {
    return count;
  }
  int m = get_middle(l, r);
  return left->query(l, m, k) + right->query(m + 1, r, k);
}
vector<int> xvalue;
vector<Node *> tree;
int range_query(int x, int y) {
  int i = std::lower_bound(xvalue.begin(), xvalue.end(), x) - xvalue.begin();
  return tree[i]->query(-INF, INF, y);
}
double mix(int x) { return x - 0.5; }
int main() {
  null = new Node(0, NULL, NULL);
  null->left = null->right = null;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &point[i].x, &point[i].y);
    xvalue.push_back(point[i].x);
  }
  std::sort(xvalue.begin(), xvalue.end());
  xvalue.erase(std::unique(xvalue.begin(), xvalue.end()), xvalue.end());
  std::copy(point, point + n, point_by_x);
  std::sort(point_by_x, point_by_x + n, by_x);
  std::copy(point, point + n, point_by_y);
  std::sort(point_by_y, point_by_y + n, by_y);
  tree.push_back(null);
  for (int i = 0, j = 0; i < (int)xvalue.size(); ++i) {
    Node *root = tree.back();
    while (j < n && point_by_x[j].x == xvalue[i]) {
      root = root->insert(-INF, INF, point_by_x[j++].y);
    }
    tree.push_back(root);
  }
  int p[9], b[9];
  for (int i = 0; i < 9; ++i) {
    scanf("%d", a + i);
    p[i] = i;
  }
  do {
    for (int i = 0; i < 9; ++i) {
      b[i] = a[p[i]];
    }
    bool valid = true;
    int x_0 = point_by_x[b[0] + b[1] + b[2] - 1].x + 1;
    int x_1 = point_by_x[n - (b[6] + b[7] + b[8])].x;
    int y_0 = point_by_y[b[0] + b[3] + b[6] - 1].y + 1;
    int y_1 = point_by_y[n - (b[2] + b[5] + b[8])].y;
    valid &= range_query(x_0, INF + 1) == b[0] + b[1] + b[2];
    valid &= range_query(INF + 1, y_0) == b[0] + b[3] + b[6];
    valid &=
        range_query(x_1, INF + 1) == b[0] + b[1] + b[2] + b[3] + b[4] + b[5];
    valid &=
        range_query(INF + 1, y_1) == b[0] + b[3] + b[6] + b[1] + b[4] + b[7];
    valid &= range_query(x_0, y_0) == b[0];
    valid &= range_query(x_0, y_1) == b[0] + b[1];
    valid &= range_query(x_1, y_0) == b[0] + b[3];
    valid &= range_query(x_1, y_1) == b[0] + b[1] + b[3] + b[4];
    if (valid) {
      printf("%.8f %.8f\n%.8f %.8f\n", mix(x_0), mix(x_1), mix(y_0), mix(y_1));
      return 0;
    }
  } while (std::next_permutation(p, p + 9));
  puts("-1");
  return 0;
}