#include <bits/stdc++.h>
using namespace std;
vector<int> t[4 * 100100], ai[2][100100];
int query(int root, int rl, int rr, int a, int b, int x) {
  if (b < a) return 0;
  if (a == rl && b == rr)
    return upper_bound(t[root].begin(), t[root].end(), x) - t[root].begin();
  int rm = (rl + rr) / 2;
  return query(2 * root + 1, rl, rm, a, min(b, rm), x) +
         query(2 * root + 2, rm + 1, rr, max(a, rm + 1), b, x);
}
void init(int root, int rl, int rr) {
  if (rl == rr)
    t[root] = ai[0][rl];
  else {
    int rm = (rl + rr) / 2;
    init(2 * root + 1, rl, rm);
    init(2 * root + 2, rm + 1, rr);
    t[root] = vector<int>(t[2 * root + 1].size() + t[2 * root + 2].size());
    merge(t[2 * root + 1].begin(), t[2 * root + 1].end(),
          t[2 * root + 2].begin(), t[2 * root + 2].end(), t[root].begin());
  }
}
vector<int> ids[2];
int gxid(int k, int x) {
  return lower_bound(ids[k].begin(), ids[k].end(), x) - ids[k].begin();
}
int s[2][3], qids[2], sai[2][100100];
int v[100100][2], a[10];
bool flines(int k, int &xa, int &xb) {
  int es0 = 1, di0 = qids[k];
  while (di0 > es0) {
    int me = (es0 + di0) / 2;
    if (sai[k][me] >= s[k][0])
      di0 = me;
    else
      es0 = me + 1;
  }
  int es1 = es0 + 1, di1 = qids[k];
  while (di1 > es1) {
    int me = (es1 + di1) / 2;
    if (sai[k][me] - sai[k][es0] >= s[k][1])
      di1 = me;
    else
      es1 = me + 1;
  }
  if (sai[k][es0] != s[k][0] || sai[k][es1] - sai[k][es0] != s[k][1]) return 0;
  xa = es0 - 1;
  xb = es1 - 1;
  return 1;
}
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    for (int k = 0; k < (int)2; k++) ids[k].clear();
    for (int i = 0; i < (int)n; i++)
      for (int k = 0; k < (int)2; k++) {
        scanf("%d", &v[i][k]);
        ids[k].push_back(v[i][k]);
      }
    for (int k = 0; k < (int)2; k++) {
      sort(ids[k].begin(), ids[k].end());
      ids[k].resize(unique(ids[k].begin(), ids[k].end()) - ids[k].begin());
      qids[k] = ids[k].size();
    }
    for (int k = 0; k < (int)2; k++) {
      for (int i = 0; i < (int)qids[k]; i++) ai[k][i].clear();
      for (int i = 0; i < (int)n; i++)
        ai[k][gxid(k, v[i][k])].push_back(gxid(1 - k, v[i][1 - k]));
      for (int i = 0; i < (int)qids[k]; i++) {
        sort(ai[k][i].begin(), ai[k][i].end());
        sai[k][i + 1] = sai[k][i] + ai[k][i].size();
      }
    }
    init(0, 0, qids[0] - 1);
    for (int i = 0; i < (int)9; i++) scanf("%d", &a[i]);
    sort(a, a + 9);
    bool ok = 0;
    do {
      for (int i = 0; i < (int)3; i++) {
        s[0][i] = s[1][i] = 0;
        for (int j = 0; j < (int)3; j++) s[0][i] += a[i + 3 * j];
        for (int j = 0; j < (int)3; j++) s[1][i] += a[i * 3 + j];
      }
      if (a[0] == 1 && a[1] == 2 && a[2] == 2 && a[3] == 1 && a[4] == 2 &&
          a[5] == 2 && a[6] == 1 && a[7] == 3)
        ok = 0;
      int xa, xb, ya, yb;
      if (!flines(0, xa, xb) || !flines(1, ya, yb)) continue;
      int p[6];
      p[0] = query(0, 0, qids[0] - 1, 0, xa, ya);
      p[1] = query(0, 0, qids[0] - 1, xa + 1, xb, ya);
      p[2] = query(0, 0, qids[0] - 1, xb + 1, qids[0] - 1, ya);
      p[3] = query(0, 0, qids[0] - 1, 0, xa, yb) - p[0];
      p[4] = query(0, 0, qids[0] - 1, xa + 1, xb, yb) - p[1];
      p[5] = query(0, 0, qids[0] - 1, xb + 1, qids[0] - 1, yb) - p[2];
      ok = 1;
      for (int i = 0; i < (int)6; i++)
        if (p[i] != a[i]) ok = 0;
      if (ok) {
        printf("%lf %lf\n%lf %lf\n", ids[0][xa] + 0.5, ids[0][xb] + 0.5,
               ids[1][ya] + 0.5, ids[1][yb] + 0.5);
        break;
      }
    } while (next_permutation(a, a + 9));
    if (!ok) printf("-1\n");
  }
  return 0;
}
