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;
template <typename S, typename T>
ostream &operator<<(ostream &os, pair<S, T> p) {
  return os << "(" << p.first << "," << p.second << ")";
};
template <class T>
void PV(T x) {
  for (__typeof__((x).begin()) i = (x).begin(); i != (x).end(); ++i)
    cout << *i << " ";
  cout << endl;
}
const int INF = (1u << (31)) - 1;
vector<int> ta;
int ta_find(int x, int n) {
  int ret = 0;
  x++;
  while (x >= 1) {
    ret += ta[x];
    x -= x & -x;
  }
  return ret;
}
void ta_ins(int x, int n) {
  x++;
  while (x <= n) {
    ta[x]++;
    x += x & -x;
  }
}
int n;
vector<pair<int, int> > p;
vector<int> a(9);
vector<pair<pair<int, int>, int> > sp;
map<pair<int, int>, int> p2n;
bool findL(int s, vector<pair<int, int> > &p, int &x) {
  assert(s != n);
  if (p[s - 1].first < p[s].first) {
    x = p[s - 1].first + 1;
    return true;
  }
  return false;
}
int C(int x0, int y0, int x1, int y1) {
  return p2n[make_pair(x1, y1)] - p2n[make_pair(x0, y1)] -
         p2n[make_pair(x1, y0)] + p2n[make_pair(x0, y0)];
}
bool check(int x0, int y0, int x1, int y1, const vector<int> &a) {
  if (C(-INF, -INF, x0, y0) != a[0]) return false;
  if (C(-INF, y0, x0, y1) != a[1]) return false;
  if (C(-INF, y1, x0, INF) != a[2]) return false;
  if (C(x0, -INF, x1, y0) != a[3]) return false;
  if (C(x0, y0, x1, y1) != a[4]) return false;
  if (C(x0, y1, x1, INF) != a[5]) return false;
  if (C(x1, -INF, INF, y0) != a[6]) return false;
  if (C(x1, y0, INF, y1) != a[7]) return false;
  if (C(x1, y1, INF, INF) != a[8]) return false;
  return true;
}
int main(int argc, char *argv[]) {
  cin >> n;
  p.resize(n);
  for (int n_ = (n), i = 0; i < n_; ++i) cin >> p[i].first >> p[i].second;
  for (int n_ = (n), i = 0; i < n_; ++i) p[i].first *= 2, p[i].second *= 2;
  for (int n_ = (9), i = 0; i < n_; ++i) cin >> a[i];
  vector<pair<int, int> > xp = p, yp = p;
  for (auto &pi : yp) swap(pi.first, pi.second);
  sort((xp).begin(), (xp).end());
  sort((yp).begin(), (yp).end());
  sort((a).begin(), (a).end());
  do {
    int xs0 = a[0] + a[1] + a[2];
    int xs1 = xs0 + a[3] + a[4] + a[5];
    int ys0 = a[0] + a[3] + a[6];
    int ys1 = ys0 + a[1] + a[4] + a[7];
    int x0, x1, y0, y1;
    if (findL(xs0, xp, x0))
      if (findL(xs1, xp, x1))
        if (findL(ys0, yp, y0))
          if (findL(ys1, yp, y1)) {
            sp.push_back(make_pair(make_pair(-INF, -INF), 0));
            sp.push_back(make_pair(make_pair(-INF, y0), 0));
            sp.push_back(make_pair(make_pair(-INF, y1), 0));
            sp.push_back(make_pair(make_pair(-INF, INF), 0));
            sp.push_back(make_pair(make_pair(x0, -INF), 0));
            sp.push_back(make_pair(make_pair(x0, y0), 0));
            sp.push_back(make_pair(make_pair(x0, y1), 0));
            sp.push_back(make_pair(make_pair(x0, INF), 0));
            sp.push_back(make_pair(make_pair(x1, -INF), 0));
            sp.push_back(make_pair(make_pair(x1, y0), 0));
            sp.push_back(make_pair(make_pair(x1, y1), 0));
            sp.push_back(make_pair(make_pair(x1, INF), 0));
            sp.push_back(make_pair(make_pair(INF, -INF), 0));
            sp.push_back(make_pair(make_pair(INF, y0), 0));
            sp.push_back(make_pair(make_pair(INF, y1), 0));
            sp.push_back(make_pair(make_pair(INF, INF), 0));
          }
  } while (next_permutation((a).begin(), (a).end()));
  for (auto &pi : p) sp.push_back(make_pair(pi, 1));
  sort((sp).begin(), (sp).end());
  sp.resize(unique((sp).begin(), (sp).end()) - sp.begin());
  vector<int> d;
  for (auto &spi : sp) d.push_back(spi.first.second);
  sort((d).begin(), (d).end());
  d.resize(unique((d).begin(), (d).end()) - d.begin());
  ta.assign(d.size() + 1, 0);
  for (auto &spi : sp) {
    int l = lower_bound((d).begin(), (d).end(), spi.first.second) - d.begin();
    if (spi.second)
      ta_ins(l, d.size());
    else
      p2n[spi.first] = ta_find(l, d.size());
  }
  do {
    int xs0 = a[0] + a[1] + a[2];
    int xs1 = xs0 + a[3] + a[4] + a[5];
    int ys0 = a[0] + a[3] + a[6];
    int ys1 = ys0 + a[1] + a[4] + a[7];
    int x0, x1, y0, y1;
    if (findL(xs0, xp, x0))
      if (findL(xs1, xp, x1))
        if (findL(ys0, yp, y0))
          if (findL(ys1, yp, y1)) {
            if (check(x0, y0, x1, y1, a)) {
              cout << setiosflags(ios::fixed);
              cout << setprecision(18) << endl;
              cout << x0 * .5 << " " << x1 * .5 << endl;
              cout << y0 * .5 << " " << y1 * .5 << endl;
              return 0;
            }
          }
  } while (next_permutation((a).begin(), (a).end()));
  cout << -1 << endl;
  return 0;
}