#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;
}
