#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  int f = 0, ch = 0;
  x = 0;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = 1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - 48;
  if (f) x = -x;
}
struct Point {
  int x, y;
} d[(200005)];
int a[11], c[11], s[11];
int rt[(200005)], x[(200005)], fx[(200005)], fy[(200005)], y[(200005)],
    ax[(200005)], ay[(200005)], n, lm;
inline bool cmp(Point A, Point B) { return A.x < B.x; }
struct SegmentTree {
  int sz[(200005) * 25], lc[(200005) * 25], rc[(200005) * 25], cnt;
  inline void ins(int &u, int pr, int l, int r, int pos) {
    u = ++cnt;
    lc[u] = lc[pr], rc[u] = rc[pr], sz[u] = sz[pr] + 1;
    if (l == r) return;
    int mid = l + r >> 1;
    if (pos <= mid)
      ins(lc[u], lc[pr], l, mid, pos);
    else
      ins(rc[u], rc[pr], mid + 1, r, pos);
  }
  inline pair<int, int> query(int u, int l, int r, int res, int k) {
    if (l == r) return make_pair(res + sz[u], l);
    int mid = l + r >> 1, lsize = sz[lc[u]];
    if (k <= lsize)
      return query(lc[u], l, mid, res, k);
    else
      return query(rc[u], mid + 1, r, res + lsize, k - lsize);
  }
  inline int ask(int x, int y, int l, int r, int L, int R) {
    if (l >= L && r <= R) return sz[y] - sz[x];
    int mid = l + r >> 1, res = 0;
    if (L <= mid) res += ask(lc[x], lc[y], l, mid, L, R);
    if (mid < R) res += ask(rc[x], rc[y], mid + 1, r, L, R);
    return res;
  }
} van;
inline int queryx(int x) {
  int l = 1, r = lm, ans = -1;
  while (l <= r) {
    int mid = l + r >> 1;
    if (van.sz[rt[mid]] <= x)
      ans = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  if (ans == -1) return ans;
  if (van.sz[rt[ans]] != x) return -1;
  return ans;
}
inline int queryy(int x) {
  pair<int, int> res = van.query(rt[lm], 1, n, 0, x);
  if (res.first == x)
    return res.second;
  else
    return -1;
}
inline void solve() {
  for (int i = 1; i <= 9; i++) a[i] = s[c[i]];
  int xx1 = a[1] + a[2] + a[3], xx2 = xx1 + a[4] + a[5] + a[6];
  int yy1 = a[1] + a[4] + a[7], yy2 = yy1 + a[2] + a[5] + a[8];
  int px1 = queryx(xx1);
  if (px1 == -1) return;
  int px2 = queryx(xx2);
  if (px2 == -1) return;
  int py1 = queryy(yy1);
  if (py1 == -1) return;
  int py2 = queryy(yy2);
  if (py2 == -1) return;
  if (van.ask(rt[0], rt[px1], 1, n, 1, py1) != a[1]) return;
  if (van.ask(rt[0], rt[px1], 1, n, py1 + 1, py2) != a[2]) return;
  if (van.ask(rt[0], rt[px1], 1, n, py2 + 1, n) != a[3]) return;
  if (van.ask(rt[px1], rt[px2], 1, n, 1, py1) != a[4]) return;
  if (van.ask(rt[px1], rt[px2], 1, n, py1 + 1, py2) != a[5]) return;
  if (van.ask(rt[px1], rt[px2], 1, n, py2 + 1, n) != a[6]) return;
  if (van.ask(rt[px2], rt[lm], 1, n, 1, py1) != a[7]) return;
  if (van.ask(rt[px2], rt[lm], 1, n, py1 + 1, py2) != a[8]) return;
  if (van.ask(rt[px2], rt[lm], 1, n, py2 + 1, n) != a[9]) return;
  printf("%.12lf %.12lf\n", fx[px1] + 0.5, fx[px2] + 0.5);
  printf("%.12lf %.12lf\n", fy[py1] + 0.5, fy[py2] + 0.5);
  exit(0);
}
int main() {
  read(n);
  for (int i = 1; i <= n; i++)
    read(ax[i]), read(ay[i]), x[i] = ax[i], y[i] = ay[i];
  for (int i = 1; i <= 9; i++) read(s[i]), c[i] = i;
  sort(x + 1, x + n + 1), sort(y + 1, y + n + 1);
  int sx = unique(x + 1, x + n + 1) - x - 1;
  int sy = unique(y + 1, y + n + 1) - y - 1;
  for (int i = 1; i <= n; i++) {
    d[i].x = lower_bound(x + 1, x + sx + 1, ax[i]) - x;
    d[i].y = lower_bound(y + 1, y + sy + 1, ay[i]) - y;
    fx[d[i].x] = ax[i], fy[d[i].y] = ay[i];
  }
  sort(d + 1, d + n + 1, cmp);
  for (int i = 1; i <= n; i++) {
    if (d[i].x == d[i - 1].x)
      van.ins(rt[d[i].x], rt[d[i].x], 1, n, d[i].y);
    else
      van.ins(rt[d[i].x], rt[d[i - 1].x], 1, n, d[i].y), lm++;
  }
  for (int i = 1; i <= 362880; i++) solve(), next_permutation(c + 1, c + 10);
  puts("-1");
  return 0;
}
