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;
const int N = 100100;
struct IO {
  IO() {}
  inline bool is(char c) { return c >= '0' && c <= '9'; }
  inline int read() {
    char c;
    bool ok = false;
    while (!is(c = getchar())) {
      if (c == '-') ok = true;
    }
    int num = c - '0';
    while (is(c = getchar())) num = num * 10 + c - '0';
    return ok ? -num : num;
  }
  inline void out(long long first) {
    if (first == 0) {
      printf("0\n");
      return;
    }
    char tmp[20];
    int cnt = 0;
    while (first) {
      tmp[cnt++] = first % 10 + '0';
      first /= 10;
    }
    for (int i = cnt - 1; i >= 0; i--) printf("%c", tmp[i]);
    printf("\n");
  }
} FAST;
int n;
int P[11];
int WH[N];
vector<int> X, Y;
vector<pair<int, int> > POINT;
int dp_x[N];
int dp_y[N];
int sum_x[N];
int sum_y[N];
int sz_x, sz_y;
int off = 1;
int lo, hi;
vector<int> T[(1 << 21) + 10];
inline void load() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int first, second;
    first = FAST.read();
    second = FAST.read();
    POINT.push_back(make_pair(first, second));
    X.push_back(first);
    Y.push_back(second);
  }
  for (int i = 0; i < 9; i++) scanf("%d", &P[i]);
}
inline int wh_x(int first) {
  return lower_bound((X).begin(), (X).end(), first) - X.begin();
}
inline int wh_y(int first) {
  return lower_bound((Y).begin(), (Y).end(), first) - Y.begin();
}
inline int find_vertical1(int sum) {
  int low = 0, high = sz_x, middle;
  while (low <= high) {
    middle = (low + high) >> 1;
    if (sum_x[middle] >= sum)
      high = middle - 1;
    else
      low = middle + 1;
  }
  return low;
}
inline int get_sum(int *aa, int first, int second) {
  if (!first) return aa[second];
  return aa[second] - aa[first - 1];
}
inline int find_vertical2(int sum) {
  int low = 0, high = sz_x, middle;
  while (low <= high) {
    middle = (low + high) >> 1;
    if (get_sum(sum_x, middle, sz_x) <= sum)
      high = middle - 1;
    else
      low = middle + 1;
  }
  return low;
}
inline int find_horizontal1(int sum) {
  int low = 0, high = sz_y, middle;
  while (low <= high) {
    middle = (low + high) >> 1;
    if (sum_y[middle] >= sum)
      high = middle - 1;
    else
      low = middle + 1;
  }
  return low;
}
inline int find_horizontal2(int sum) {
  int low = 0, high = sz_y, middle;
  while (low <= high) {
    middle = (low + high) >> 1;
    if (get_sum(sum_y, middle, sz_y) <= sum)
      high = middle - 1;
    else
      low = middle + 1;
  }
  return low;
}
int VAL1, VAL2;
int query(int a, int b, int node) {
  if (a > hi || b < lo) return 0;
  if (a >= lo && b <= hi) {
    return upper_bound((T[node]).begin(), (T[node]).end(), VAL2) -
           lower_bound((T[node]).begin(), (T[node]).end(), VAL1);
  }
  return query(a, (a + b) / 2, node * 2) +
         query((a + b) / 2 + 1, b, node * 2 + 1);
}
inline bool check() {
  int aa1 = P[0] + P[3] + P[6];
  int aa2 = P[2] + P[5] + P[8];
  int aa3 = P[6] + P[7] + P[8];
  int aa4 = P[0] + P[1] + P[2];
  int x1 = find_vertical1(aa1);
  int x2 = find_vertical2(aa2);
  int y1 = find_horizontal1(aa3);
  int y2 = find_horizontal2(aa4);
  if (sum_x[x1] != aa1) return 0;
  if (get_sum(sum_x, x2, sz_x) != aa2) return 0;
  if (sum_y[y1] != aa3) return 0;
  if (get_sum(sum_y, y2, sz_y) != aa4) return 0;
  lo = 0;
  hi = x1;
  VAL1 = y2;
  VAL2 = sz_y;
  int ff1 = query(0, off - 1, 1);
  if (ff1 != P[0]) return 0;
  VAL1 = y1 + 1;
  VAL2 = y2 - 1;
  int ff4 = query(0, off - 1, 1);
  if (ff4 != P[3]) return 0;
  VAL1 = 0;
  VAL2 = y1;
  int ff7 = query(0, off - 1, 1);
  if (ff7 != P[6]) return 0;
  lo = x1 + 1;
  hi = x2 - 1;
  VAL1 = y2;
  VAL2 = sz_y;
  int ff2 = query(0, off - 1, 1);
  if (ff2 != P[1]) return 0;
  VAL1 = y1 + 1;
  VAL2 = y2 - 1;
  int ff5 = query(0, off - 1, 1);
  if (ff5 != P[4]) return 0;
  VAL1 = 0;
  VAL2 = y1;
  int ff8 = query(0, off - 1, 1);
  if (ff8 != P[7]) return 0;
  lo = x2;
  hi = sz_x;
  VAL1 = y2;
  VAL2 = sz_y;
  int ff3 = query(0, off - 1, 1);
  if (ff3 != P[2]) return 0;
  VAL1 = y1 + 1;
  VAL2 = y2 - 1;
  int ff6 = query(0, off - 1, 1);
  if (ff6 != P[5]) return 0;
  VAL1 = 0;
  VAL2 = y1;
  int ff9 = query(0, off - 1, 1);
  if (ff9 != P[8]) return 0;
  int ans1 = X[x1];
  int ans2 = X[x2];
  int ans3 = Y[y1];
  int ans4 = Y[y2];
  printf("%lf %lf\n%lf %lf\n", ans1 + 0.5, ans2 - 0.5, ans3 + 0.5, ans4 - 0.5);
  return 1;
}
inline void merge(int first) {
  int cnt1 = 0, cnt2 = 0;
  for (;;) {
    if (cnt1 < T[first * 2].size() && cnt2 < T[first * 2 + 1].size()) {
      if (T[first * 2][cnt1] < T[first * 2 + 1][cnt2])
        T[first].push_back(T[first * 2][cnt1]), cnt1++;
      else
        T[first].push_back(T[first * 2 + 1][cnt2]), cnt2++;
    } else if (cnt1 < T[first * 2].size())
      T[first].push_back(T[first * 2][cnt1]), cnt1++;
    else if (cnt2 < T[first * 2 + 1].size())
      T[first].push_back(T[first * 2 + 1][cnt2]), cnt2++;
    else
      break;
  }
}
inline void solve() {
  sort(P, P + 9);
  sort((X).begin(), (X).end());
  X.erase(unique((X).begin(), (X).end()), X.end());
  sort((Y).begin(), (Y).end());
  Y.erase(unique((Y).begin(), (Y).end()), Y.end());
  for (int i = 0; i < n; i++) {
    dp_x[wh_x(POINT[i].first)]++;
    dp_y[wh_y(POINT[i].second)]++;
  }
  sum_x[0] = dp_x[0];
  sum_y[0] = dp_y[0];
  sz_x = (int)X.size() - 1;
  for (int i = 1; i < X.size(); i++) sum_x[i] = sum_x[i - 1] + dp_x[i];
  sz_y = (int)Y.size() - 1;
  for (int i = 1; i < Y.size(); i++) sum_y[i] = sum_y[i - 1] + dp_y[i];
  while (off < X.size()) off <<= 1;
  for (int i = 0; i < n; i++) {
    T[wh_x(POINT[i].first) + off].push_back(wh_y(POINT[i].second));
  }
  for (int i = 0; i < X.size(); i++)
    sort((T[i + off]).begin(), (T[i + off]).end());
  for (int i = off - 1; i >= 1; i--) merge(i);
  do {
    if (check()) return;
  } while (next_permutation(P, P + 9));
  printf("-1\n");
}
int main(void) {
  load();
  solve();
  return 0;
}