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>
inline unsigned int getuint() {
  char w = getchar();
  while (w < '0' || '9' < w) w = getchar();
  unsigned int ans = 0;
  for (; '0' <= w && w <= '9'; w = getchar()) ans = ans * 10 + w - '0';
  return ans;
}
inline int getint() {
  char w = getchar(), last = '?';
  for (; w < '0' || '9' < w; w = getchar()) last = w;
  unsigned int ans = 0;
  for (; '0' <= w && w <= '9'; w = getchar()) ans = ans * 10 + w - '0';
  return last != '-' ? ans : -ans;
}
int n;
std::pair<int, int> a[100005], a0[100005];
struct Chairman_Tree {
  struct node {
    node *s[2];
    int size;
  } pool[2333333], *poolnow, *null, *root[100005];
  inline node *newnode() {
    node *p = poolnow++;
    return p->s[0] = p->s[1] = null, p;
  }
  Chairman_Tree() {
    null = (poolnow = pool)++, null->s[0] = null->s[1] = null, root[0] = null;
  }
  inline void build(node *p, node *&q0, int pos) {
    node *q = q0 = newnode();
    for (int l = 1, r = n;;) {
      q->size = p->size + 1;
      if (l == r) return;
      int mid = l + r >> 1, f = pos > mid;
      q->s[f] = newnode(), q->s[!f] = p->s[!f];
      p = p->s[f], q = q->s[f];
      if (f)
        l = mid + 1;
      else
        r = mid;
    }
  }
  inline int query(int i, int pos) {
    node *p = root[i];
    for (int l = 1, r = n, ans = 0;;) {
      if (pos == r) return ans + p->size;
      if (l == r) return ans;
      int mid = l + r >> 1, f = pos > mid;
      if (f) ans += p->s[0]->size;
      p = p->s[f];
      if (f)
        l = mid + 1;
      else
        r = mid;
    }
  }
  void init() {
    for (int i = 1, j = 1; i <= n; i++)
      for (root[i] = root[i - 1]; j <= n && i == a[j].first; j++)
        build(root[i], root[i], a[j].second);
  }
} CT;
int sx[100005], sy[100005];
int main() {
  n = getuint();
  for (int i = 1; i <= n; i++)
    a[i].first = getint(), a[i].second = getint(), a0[i] = a[i];
  static int tmp[100005], X[100005], Y[100005];
  for (int i = 1; i <= n; i++) tmp[i] = a[i].first;
  std::sort(tmp + 1, tmp + n + 1);
  for (int i = 1; i <= n; i++)
    a[i].first = std::lower_bound(tmp + 1, tmp + n + 1, a[i].first) - tmp;
  for (int i = 1; i <= n; i++) X[a[i].first] = a0[i].first;
  for (int i = 1; i <= n; i++) tmp[i] = a[i].second;
  std::sort(tmp + 1, tmp + n + 1);
  for (int i = 1; i <= n; i++)
    a[i].second = std::lower_bound(tmp + 1, tmp + n + 1, a[i].second) - tmp;
  for (int i = 1; i <= n; i++) Y[a[i].second] = a0[i].second;
  std::sort(a + 1, a + n + 1);
  CT.init();
  for (int i = 1; i <= n; i++) sx[a[i].first]++, sy[a[i].second]++;
  for (int i = 1; i <= n; i++) sx[i] += sx[i - 1], sy[i] += sy[i - 1];
  for (int i = 1; i <= 9; i++) tmp[i] = getuint();
  for (std::sort(tmp + 1, tmp + 10);;) {
    int tx1 = tmp[1] + tmp[2] + tmp[3],
        x1 = std::lower_bound(sx + 1, sx + n + 1, tx1) - sx;
    int tx2 = tmp[1] + tmp[2] + tmp[3] + tmp[4] + tmp[5] + tmp[6],
        x2 = std::lower_bound(sx + 1, sx + n + 1, tx2) - sx;
    int ty1 = tmp[1] + tmp[4] + tmp[7],
        y1 = std::lower_bound(sy + 1, sy + n + 1, ty1) - sy;
    int ty2 = tmp[1] + tmp[4] + tmp[7] + tmp[2] + tmp[5] + tmp[8],
        y2 = std::lower_bound(sy + 1, sy + n + 1, ty2) - sy;
    if (tx1 == sx[x1] && tx2 == sx[x2] && ty1 == sy[y1] && ty2 == sy[y2])
      if (CT.query(x1, y1) == tmp[1] && CT.query(x1, y2) == tmp[1] + tmp[2] &&
          CT.query(x2, y1) == tmp[1] + tmp[4] &&
          CT.query(x2, y2) == tmp[1] + tmp[2] + tmp[4] + tmp[5])
        return printf("%.12f %.12f\n%.12f %.12f\n", X[x1] + 0.5, X[x2] + 0.5,
                      Y[y1] + 0.5, Y[y2] + 0.5),
               0;
    if (!std::next_permutation(tmp + 1, tmp + 10)) return puts("-1"), 0;
  }
  return 0;
}