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 T>
inline string toString(T a) {
  ostringstream os("");
  os << a;
  return os.str();
}
template <typename T>
inline long long toLong(T a) {
  long long res;
  istringstream os(a);
  os >> res;
  return res;
}
template <typename T>
inline T S(T a) {
  return a * a;
}
template <typename T>
inline T gcd(T a, T b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
template <typename T>
inline unsigned long long bigmod(T a, T b, T m) {
  if (b == 0)
    return 1;
  else if (b % 2 == 0)
    return S(bigmod(a, b / 2, m)) % m;
  else
    return (a % m * bigmod(a, b - 1, m)) % m;
}
template <typename T>
inline vector<string> parse(T str) {
  vector<string> res;
  string s;
  istringstream os(str);
  while (os >> s) res.push_back(s);
  return res;
}
template <typename T>
inline unsigned long long dist(T A, T B) {
  unsigned long long res =
      (A.x - B.x) * (A.x - B.x) + (A.y - B.y) * (A.y - B.y);
  return res;
}
template <typename T>
inline double cosAngle(T a, T b, T c) {
  double res = a * a + b * b - c * c;
  res = res / (2 * a * b);
  res = acos(res);
  return res;
}
template <typename T>
inline T power(T base, int po) {
  T res = 1;
  if (base == 0) return 0;
  for (int i = (0); i < (po); i++) res *= base;
  return res;
}
template <typename T>
inline bool isOn(T mask, T pos) {
  return mask & (1 << pos);
}
template <typename T>
inline int Off(T mask, T pos) {
  return mask ^ (1 << pos);
}
template <typename T>
inline int On(T mask, T pos) {
  return mask | (1 << pos);
}
string str;
int len;
pair<int, int> P[100015];
int ary[100015];
int hi;
struct Z {
  vector<int> v;
};
Z tree[4 * 100015];
int N;
vector<int> tmp;
map<pair<pair<int, int>, int>, int> M;
void insert(int cur, int st, int ed) {
  if (st == ed) {
    tree[cur].v.push_back(P[st].second);
    return;
  }
  int mid, lft, rgt;
  mid = (st + ed) / 2;
  lft = 2 * cur;
  rgt = lft + 1;
  insert(lft, st, mid);
  insert(rgt, mid + 1, ed);
  for (int i = st; i <= ed; i++) {
    tree[cur].v.push_back(P[i].second);
  }
  sort((tree[cur].v).begin(), (tree[cur].v).end());
}
int query(int cur, int st, int ed, int x, int y, int val) {
  if (st == x && ed == y)
    return upper_bound((tree[cur].v).begin(), (tree[cur].v).end(), val) -
           tree[cur].v.begin();
  int mid = (st + ed) / 2;
  if (y <= mid)
    return query(2 * cur, st, mid, x, y, val);
  else if (x > mid)
    return query(2 * cur + 1, mid + 1, ed, x, y, val);
  else
    return query(2 * cur, st, mid, x, mid, val) +
           query(2 * cur + 1, mid + 1, ed, mid + 1, y, val);
}
int find(int need, int x, int y) {
  pair<int, int> pp = make_pair(x, y);
  pair<pair<int, int>, int> ppp = make_pair(pp, need);
  if (M.find(ppp) == M.end()) {
    int low, high, mid;
    low = 1, high = N;
    int res = hi;
    while (low <= high) {
      mid = (low + high) / 2;
      int ase = query(1, 1, N, x, y, ary[mid]);
      if (ase == need) res = ary[mid];
      if (ase >= need) {
        high = mid - 1;
      } else
        low = mid + 1;
    }
    M[ppp] = res;
    return res;
  }
  return M[ppp];
}
pair<int, int> RS;
bool check(int a, int b, int c) {
  int y1, y2;
  y1 = find(tmp[0], 1, a);
  y1 = (y1 > find(tmp[3], a + 1, b) ? y1 : find(tmp[3], a + 1, b));
  y1 = (y1 > find(tmp[6], b + 1, c) ? y1 : find(tmp[6], b + 1, c));
  if (y1 == hi) return false;
  if (query(1, 1, N, 1, a, y1) != tmp[0]) return false;
  if (query(1, 1, N, a + 1, b, y1) != tmp[3]) return false;
  if (query(1, 1, N, b + 1, c, y1) != tmp[6]) return false;
  y2 = find(tmp[0] + tmp[1], 1, a);
  y2 = (y2 > find(tmp[3] + tmp[4], a + 1, b) ? y2
                                             : find(tmp[3] + tmp[4], a + 1, b));
  y2 = (y2 > find(tmp[6] + tmp[7], b + 1, c) ? y2
                                             : find(tmp[6] + tmp[7], b + 1, c));
  if (y2 == hi) return false;
  if (query(1, 1, N, 1, a, y2) != (tmp[0] + tmp[1])) return false;
  if (query(1, 1, N, a + 1, b, y2) != (tmp[3] + tmp[4])) return false;
  if (query(1, 1, N, b + 1, c, y2) != (tmp[6] + tmp[7])) return false;
  RS = make_pair(y1, y2);
  return true;
}
int main() {
  int i, j, k;
  int ks, cas;
  int n, m;
  cin >> n;
  pair<int, int> p;
  N = n;
  for (int i = (1); i < (n + 1); i++) {
    scanf("%d%d", &p.first, &p.second);
    P[i] = p;
    ary[i] = p.second;
  }
  sort(P + 1, P + n + 1);
  insert(1, 1, n);
  hi = 1000000007;
  int baki = 9000;
  for (i = 0; i < 9; i++) {
    cin >> k;
    tmp.push_back(k);
  }
  sort((tmp).begin(), (tmp).end());
  sort(ary + 1, ary + n + 1);
  int a, b, c;
  int y1, y2;
  bool state = 1;
  int it = 0;
  do {
    a = tmp[0] + tmp[1] + tmp[2];
    b = a + tmp[3] + tmp[4] + tmp[5];
    c = N;
    if ((P[a].first == P[a + 1].first) || (P[b].first == P[b + 1].first))
      ;
    else {
      if (check(a, b, c)) {
        y1 = RS.first;
        y2 = RS.second;
        double aa, bb, cc, dd;
        aa = (double)P[a].first + 0.5;
        bb = (double)P[b].first + 0.5;
        cc = (double)y1 + 0.5;
        dd = (double)y2 + 0.5;
        cout << setprecision(10) << fixed;
        cout << aa << " " << bb << "\n" << cc << " " << dd << endl;
        return 0;
      }
    }
  } while (next_permutation((tmp).begin(), (tmp).end()) && state == true);
  if (state) {
    puts("-1");
  }
  return 0;
}