#include <bits/stdc++.h>
using namespace std;
const int tope = 100001;
int x[tope];
pair<int, int> yx[tope];
int y[3][tope];
int len[3];
int n;
int a[9];
int asig[3][3];
int p[3][3];
double solx0, solx1, soly0, soly1;
void iniperm(int p[3]) {
  for (int i = 0; i < 3; i++) p[i] = i;
}
void check() {
  for (int i = 0; i < 3; i++) {
    if (y[i][a[asig[i][p[i][0]]] - 1] == y[i][a[asig[i][p[i][0]]]]) return;
    if (y[i][a[asig[i][p[i][0]]] + a[asig[i][p[i][1]]] - 1] ==
        y[i][a[asig[i][p[i][0]]] + a[asig[i][p[i][1]]]])
      return;
  }
  int inf0 = -2000000000, sup0 = 2000000000;
  for (int i = 0; i < 3; i++) {
    inf0 = max(inf0, y[i][a[asig[i][p[i][0]]] - 1]);
    sup0 = min(sup0, y[i][a[asig[i][p[i][0]]]]);
  }
  if (inf0 >= sup0) return;
  int inf1 = -2000000000, sup1 = 2000000000;
  for (int i = 0; i < 3; i++) {
    inf1 = max(inf1, y[i][a[asig[i][p[i][0]]] + a[asig[i][p[i][1]]] - 1]);
    sup1 = min(sup1, y[i][a[asig[i][p[i][0]]] + a[asig[i][p[i][1]]]]);
  }
  if (inf1 >= sup1) return;
  soly0 = inf0 + 0.5;
  soly1 = inf1 + 0.5;
  cout << solx0 << " " << solx1 << endl;
  cout << soly0 << " " << soly1 << endl;
  exit(0);
}
void chequea() {
  iniperm(p[0]);
  do {
    iniperm(p[1]);
    do {
      iniperm(p[2]);
      do {
        check();
      } while (next_permutation(p[2], p[2] + 3));
    } while (next_permutation(p[1], p[1] + 3));
  } while (next_permutation(p[0], p[0] + 3));
}
int main() {
  cout.setf(ios::fixed);
  cout.precision(10);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> yx[i].second >> yx[i].first;
    x[i] = yx[i].second;
  }
  for (int i = 0; i < 9; i++) cin >> a[i];
  sort(x, x + n);
  sort(yx, yx + n);
  int e = 1;
  for (int i = 0; i < 9; i++) e *= 3;
  for (int c = 0; c < e; c++) {
    int cc = c;
    int index[3];
    for (int i = 0; i < 3; i++) index[i] = 0;
    bool error = false;
    for (int i = 0; i < 9; i++) {
      if (index[cc % 3] == 3) {
        error = true;
        break;
      }
      asig[cc % 3][index[cc % 3]++] = i;
      cc /= 3;
    }
    if (not error) {
      int amount[3];
      for (int i = 0; i < 3; i++)
        amount[i] = a[asig[i][0]] + a[asig[i][1]] + a[asig[i][2]];
      if (x[amount[0] - 1] != x[amount[0]] and
          x[amount[0] + amount[1] - 1] != x[amount[0] + amount[1]]) {
        int x0 = x[amount[0] - 1];
        solx0 = x0 + 0.5;
        int x1 = x[amount[0] + amount[1] - 1];
        solx1 = x1 + 0.5;
        for (int i = 0; i < 3; i++) len[i] = 0;
        for (int i = 0; i < n; i++) {
          if (yx[i].second <= x0)
            y[0][len[0]++] = yx[i].first;
          else if (yx[i].second <= x1)
            y[1][len[1]++] = yx[i].first;
          else
            y[2][len[2]++] = yx[i].first;
        }
        chequea();
      }
    }
  }
  cout << -1 << endl;
}
