#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
struct point {
  int x, y;
  bool operator<(const point a) const { return x == a.x ? y < a.y : x < a.x; }
} p[N];
int x[N], y[N], a[9], h[9], nn;
double ansx1, ansx2, ansy1, ansy2;
struct node {
  int l, r;
  vector<int> v;
} tree[N << 4];
void build(int l, int r, int x) {
  tree[x].l = l;
  tree[x].r = r;
  tree[x].v.clear();
  for (int i = l; i <= r; i++) tree[x].v.push_back(p[i].y);
  sort(tree[x].v.begin(), tree[x].v.end());
  if (l == r) return;
  int mid = (l + r) >> 1;
  build(l, mid, x << 1);
  build(mid + 1, r, x << 1 | 1);
}
int query(int l, int r, int w, int x) {
  if (tree[x].l == l && r == tree[x].r) {
    int m = tree[x].v.size();
    if (m == 0) return 0;
    if (tree[x].v[0] > w) return 0;
    if (tree[x].v.back() <= w) return m;
    return upper_bound(tree[x].v.begin(), tree[x].v.end(), w) -
           tree[x].v.begin();
  }
  int ls = x << 1, rs = ls | 1, mid = (tree[x].l + tree[x].r) >> 1;
  if (l > mid) return query(l, r, w, rs);
  if (r <= mid) return query(l, r, w, ls);
  return query(l, mid, w, ls) + query(mid + 1, r, w, rs);
}
bool ok() {
  int x1 = a[h[0]] + a[h[1]] + a[h[2]] - 1,
      x2 = a[h[3]] + a[h[4]] + a[h[5]] + x1,
      y1 = a[h[0]] + a[h[3]] + a[h[6]] - 1,
      y2 = a[h[4]] + a[h[1]] + a[h[7]] + y1;
  if (x1 + 1 >= nn || x[x1] == x[x1 + 1]) return 0;
  if (x2 + 1 >= nn || x[x2] == x[x2 + 1]) return 0;
  if (y1 + 1 >= nn || y[y1] == y[y1 + 1]) return 0;
  if (y2 + 1 >= nn || y[y2] == y[y2 + 1]) return 0;
  if (query(0, x1, y[y1], 1) != a[h[0]]) return 0;
  if (query(0, x1, y[y2], 1) != a[h[0]] + a[h[1]]) return 0;
  if (query(x1 + 1, x2, y[y1], 1) != a[h[3]]) return 0;
  if (query(x1 + 1, x2, y[y2], 1) != a[h[3]] + a[h[4]]) return 0;
  ansx1 = (x[x1] + x[x1 + 1]) / 2.0;
  ansx2 = (x[x2] + x[x2 + 1]) / 2.0;
  ansy1 = (y[y1] + y[y1 + 1]) / 2.0;
  ansy2 = (y[y2] + y[y2 + 1]) / 2.0;
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  nn = n;
  while (n--) {
    cin >> p[n].x >> p[n].y;
    x[n] = p[n].x;
    y[n] = p[n].y;
  }
  sort(x, x + nn);
  sort(y, y + nn);
  sort(p, p + nn);
  build(0, nn - 1, 1);
  for (int i = 0; i < 9; i++) cin >> a[i];
  for (int i = 0; i < 9; i++) h[i] = i;
  int m = 362880;
  while (m--) {
    if (ok()) {
      cout << ansx1 << ' ' << ansx2 << endl << ansy1 << ' ' << ansy2 << endl;
      return 0;
    }
    next_permutation(h, h + 9);
  }
  cout << -1 << endl;
  return 0;
}
