#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const int INF = 1000000009;
const int N = 100007;
int n, x[N], y[N], a[10];
vector<pair<int, int> > pt;
vector<int> xx, yy;
struct cand {
  int h1, h2, v1, v2;
  vector<int> a;
  bool ok;
  cand() { ok = true; }
};
vector<int> events[N];
vector<cand> cands;
void work(int a[10]) {
  cand now;
  int need = a[0] + a[3] + a[6];
  if (xx[need] == xx[need - 1]) {
    return;
  }
  now.v1 = need;
  need += a[1] + a[4] + a[7];
  if (xx[need] == xx[need - 1]) {
    return;
  }
  now.v2 = need;
  need = a[6] + a[7] + a[8];
  if (yy[need] == yy[need - 1]) {
    return;
  }
  now.h1 = need;
  need += a[3] + a[4] + a[5];
  if (yy[need] == yy[need - 1]) {
    return;
  }
  now.h2 = need;
  now.a = vector<int>(a, a + 9);
  events[now.v1].push_back((int)(cands).size());
  events[now.v2].push_back((int)(cands).size());
  cands.push_back(now);
}
int T[N];
void update(int pos) {
  ++pos;
  for (; pos < N; pos += (pos & -pos)) {
    T[pos]++;
  }
}
int query(int pos) {
  ++pos;
  int ret = 0;
  for (; pos; pos -= (pos & -pos)) {
    ret += T[pos];
  }
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &x[i], &y[i]);
    pt.push_back(make_pair(x[i], y[i]));
    xx.push_back(x[i]);
    yy.push_back(y[i]);
  }
  int p[10];
  for (int i = 0; i < 9; ++i) {
    scanf("%d", &a[i]);
    p[i] = i;
  }
  sort((pt).begin(), (pt).end());
  sort((xx).begin(), (xx).end());
  sort((yy).begin(), (yy).end());
  while (true) {
    int b[10];
    for (int i = 0; i < 9; ++i) {
      b[i] = a[p[i]];
    }
    work(b);
    if (!next_permutation(p, p + 9)) {
      break;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (events[i].empty()) {
      goto UPDATE;
    }
    for (int j = 0; j < (int)(events[i]).size(); ++j) {
      int ind = events[i][j];
      if (i == cands[ind].v1) {
        if (query(cands[ind].h1 - 1) != cands[ind].a[6] ||
            query(cands[ind].h2 - 1) != cands[ind].a[6] + cands[ind].a[3]) {
          cands[ind].ok = false;
        }
      } else {
        if (query(cands[ind].h1 - 1) != cands[ind].a[6] + cands[ind].a[7] ||
            query(cands[ind].h2 - 1) != cands[ind].a[6] + cands[ind].a[7] +
                                            cands[ind].a[3] + cands[ind].a[4]) {
          cands[ind].ok = false;
        }
      }
    }
  UPDATE:
    update(lower_bound((yy).begin(), (yy).end(), pt[i].second) - yy.begin());
  }
  int ind = -1;
  for (int i = 0; i < (int)(cands).size(); ++i) {
    if (cands[i].ok) {
      ind = i;
    }
  }
  if (ind == -1) {
    puts("-1");
  } else {
    printf("%.9lf %.9lf\n%.9lf %.9lf\n", xx[cands[ind].v1] - 0.5,
           xx[cands[ind].v2] - 0.5, yy[cands[ind].h1] - 0.5,
           yy[cands[ind].h2] - 0.5);
  }
  return 0;
}
