#include <bits/stdc++.h>
using namespace std;
void run();
int main() {
  ios::sync_with_stdio(0);
  run();
}
struct vec2 {
  int x, y, sum;
  vec2 *c, *rgb;
  bool operator==(vec2 const &a) const { return x == a.x and y == a.y; }
  bool operator<(vec2 const &a) const {
    return x < a.x or x == a.x and y < a.y;
  }
};
int yc[1000002], n;
struct thingy {
  vec2 *things;
  int n, pivot;
  thingy *l, *r;
  thingy(vec2 *u, vec2 *v) {
    pivot = u[rand() % (n = (v - u))].y;
    auto a = u, b = v - 1, c = b;
    while (a <= b)
      if (b->y == pivot)
        swap(a++[0], b[0]);
      else
        --b;
    for (sort(u, b = a); b < c;) {
      while (b < c and b->y < pivot) ++b;
      while (b < c and c->y > pivot) --c;
      if (b < c) swap(*b, *c);
    }
    while (b < v and b->y < pivot) ++b;
    l = (a < b ? new thingy(a, b) : nullptr);
    r = (b < v ? new thingy(b, v) : nullptr);
    int sum = 0;
    vec2 *last[2] = {};
    things = new vec2[n];
    for (int i = 0, j = 0, k = 0, t = 0; t < n; ++t) {
      vec2 &from =
          (i < (a - u) and (j == b - a or u[i] < l->things[j]) and
                   (k == v - b or u[i] < r->things[k])
               ? u[i++]
           : j < (b - a) and (k == v - b or l->things[j] < r->things[k])
               ? l->things[j++]
               : r->things[k++]);
      things[t] = {from.x, from.y, sum += (from.y <= pivot), &from,
                   max((from.y <= pivot ? last[1] : nullptr),
                       (from.y >= pivot ? last[0] : nullptr))};
      if (things[t].y != pivot) last[pivot < things[t].y] = things + t;
    }
  }
  int query(int x, int y) const {
    vec2 *a = things - 1, *b = things + n;
    while (a + 1 < b) {
      vec2 *m = a + (b - a) / 2;
      (m->x <= x ? a : b) = m;
    }
    if (a < things) return 0;
    thingy const *on = this;
    int res = 0;
    while (a and on) {
      if (on->pivot <= y) res += a->sum;
      if (y == on->pivot) return res;
      while (a and (a->y == on->pivot or (a->y < on->pivot) != (y < on->pivot)))
        a = a->rgb;
      if (a) on = (y < on->pivot ? on->l : on->r), a = a->c;
    }
    return res;
  }
  ~thingy() {
    delete things;
    delete l;
    delete r;
  }
};
vec2 v[100002];
void run() {
  int worth[9];
  cin >> n;
  for (int i = n; i--;) cin >> v[i].x >> v[i].y, yc[i] = v[i].y;
  sort(yc, yc + n);
  yc[n] = 1 << 30;
  for (int i = 9; i--;) cin >> worth[i];
  sort(worth, worth + 9);
  thingy data(v, v + n);
  sort(v, v + n);
  v[n].x = 1 << 30;
  do {
    int sx[3] = {}, sy[3] = {}, si[3] = {}, sj[3] = {};
    for (int i = 9; i--;) si[i / 3] += worth[i], sj[i % 3] += worth[i];
    for (int i = 0; i < 2; i++) si[i + 1] += si[i], sj[i + 1] += sj[i];
    for (int i = 3; i--;) si[i]--, sj[i]--;
    if ((sx[0] = v[si[0]].x) == v[si[0] + 1].x) continue;
    if ((sx[1] = v[si[1]].x) == v[si[1] + 1].x) continue;
    if ((sy[0] = yc[sj[0]]) == yc[sj[0] + 1]) continue;
    if ((sy[1] = yc[sj[1]]) == yc[sj[1] + 1]) continue;
    sx[2] = sy[2] = 1 << 30;
    int ya = sy[0];
    int yb = sy[1];
    int u = data.query(sx[0], ya), v = data.query(sx[1], ya),
        w = data.query(sx[2], ya);
    int a = data.query(sx[0], yb), b = data.query(sx[1], yb),
        c = data.query(sx[2], yb);
    if (u - 0 != worth[0]) continue;
    if (v - u != worth[3]) continue;
    if (w - v != worth[6]) continue;
    if (a - 0 != worth[0] + worth[1]) continue;
    if (b - a != worth[3] + worth[4]) continue;
    if (c - b != worth[6] + worth[7]) continue;
    long double ra = sx[0] + 0.5, rb = sx[1] + 0.5, rc = ya + 0.5,
                rd = yb + 0.5;
    cout.precision(10);
    cout << ra << " " << rb << "\n" << rc << " " << rd << endl;
    return;
  } while (next_permutation(worth, worth + 9));
  cout << "-1" << endl;
}
