#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 3;
const int M = 1e5 * 290 / 2;
struct point {
  int x, y;
} p[N];
int ax[N], ay[N], cnt[10], c[10], n, mx, my, sx[N], sy[N];
int T[N], id, ls[M], rs[M], sum[M];
void ins(int &u, int l, int r, int p) {
  if (!u) u = ++id;
  sum[u]++;
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (p <= mid)
    ins(ls[u], l, mid, p);
  else
    ins(rs[u], mid + 1, r, p);
}
int qry(int u, int l, int r, int ql, int qr) {
  if (!u) return 0;
  if (l == ql && r == qr) return sum[u];
  int mid = (l + r) >> 1;
  if (qr <= mid) return qry(ls[u], l, mid, ql, qr);
  if (ql > mid) return qry(rs[u], mid + 1, r, ql, qr);
  return qry(ls[u], l, mid, ql, mid) + qry(rs[u], mid + 1, r, mid + 1, qr);
}
void ins(int x, int y) {
  for (; x <= mx; x += x & (-x)) ins(T[x], 1, my, y);
}
int qry(int x, int y) {
  int ans = 0;
  for (; x >= 1; x &= x - 1) ans += qry(T[x], 1, my, 1, y);
  return ans;
}
bool solve() {
  int s1 = cnt[c[1]] + cnt[c[2]] + cnt[c[3]];
  int s2 = cnt[c[4]] + cnt[c[5]] + cnt[c[6]];
  int x1 = upper_bound(sx + 1, sx + mx + 1, s1) - sx - 1;
  if (sx[x1] != s1) return 0;
  int x2 = upper_bound(sx + 1, sx + mx + 1, s1 + s2) - sx - 1;
  if (sx[x2] != s1 + s2) return 0;
  s1 = cnt[c[3]] + cnt[c[6]] + cnt[c[9]];
  s2 = cnt[c[2]] + cnt[c[5]] + cnt[c[8]];
  int y1 = upper_bound(sy + 1, sy + my + 1, s1) - sy - 1;
  if (sy[y1] != s1) return 0;
  int y2 = upper_bound(sy + 1, sy + my + 1, s1 + s2) - sy - 1;
  if (sy[y2] != s1 + s2) return 0;
  if (qry(x1, y1) != cnt[c[3]]) return 0;
  if (qry(x1, y2) != cnt[c[3]] + cnt[c[2]]) return 0;
  if (qry(x2, y1) != cnt[c[3]] + cnt[c[6]]) return 0;
  if (qry(x2, y2) != cnt[c[3]] + cnt[c[2]] + cnt[c[6]] + cnt[c[5]]) return 0;
  printf("%.1f %.1f\n%.1f %.1f\n", 0.5 + ax[x1], 0.5 + ax[x2], 0.5 + ay[y1],
         0.5 + ay[y2]);
  return 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &p[i].x, &p[i].y);
    ax[i] = p[i].x;
    ay[i] = p[i].y;
  }
  for (int i = 1; i <= 9; i++) scanf("%d", cnt + i);
  sort(ax + 1, ax + n + 1);
  sort(ay + 1, ay + n + 1);
  mx = unique(ax + 1, ax + n + 1) - ax - 1;
  my = unique(ay + 1, ay + n + 1) - ay - 1;
  for (int i = 1; i <= n; i++) {
    p[i].x = lower_bound(ax + 1, ax + mx + 1, p[i].x) - ax;
    p[i].y = lower_bound(ay + 1, ay + my + 1, p[i].y) - ay;
    sx[p[i].x]++;
    sy[p[i].y]++;
    ins(p[i].x, p[i].y);
  }
  for (int i = 1; i <= mx; i++) sx[i] += sx[i - 1];
  for (int i = 1; i <= my; i++) sy[i] += sy[i - 1];
  for (int i = 1; i <= 9; i++) c[i] = i;
  do {
    if (solve()) return 0;
  } while (next_permutation(c + 1, c + 10));
  puts("-1");
  return 0;
}
