#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 3;
struct point {
  int x, y, id;
  bool operator<(const point &b) const {
    if (x != b.x) return x < b.x;
    return y != b.y ? y < b.y : id < b.id;
  }
} p[25 * N];
int ans[25 * N], cnt[10], c[10], n, q, mx, my;
int bit[N], ax[N], ay[N], sx[N], sy[N];
void ins(int x) {
  for (; x <= my; x += x & (-x)) bit[x]++;
}
int qry(int x) {
  int ans = 0;
  for (; x >= 1; x &= x - 1) ans += bit[x];
  return ans;
}
int rk;
bool vis[25 * N];
bool solve(int &cur, bool tag) {
  rk++;
  if (tag && !vis[rk]) return 0;
  int s1 = cnt[1] + cnt[2] + cnt[3];
  int s2 = cnt[4] + cnt[5] + cnt[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[3] + cnt[6] + cnt[9];
  s2 = cnt[2] + cnt[5] + cnt[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 (!tag) {
    vis[rk] = 1;
    p[++q] = (point){x1, y1, ++cur};
    p[++q] = (point){x1, y2, ++cur};
    p[++q] = (point){x2, y1, ++cur};
    p[++q] = (point){x2, y2, ++cur};
    return 0;
  }
  cur += 4;
  if (ans[cur - 3] != cnt[3]) return 0;
  if (ans[cur - 2] != cnt[3] + cnt[2]) return 0;
  if (ans[cur - 1] != cnt[3] + cnt[6]) return 0;
  if (ans[cur] != cnt[3] + cnt[2] + cnt[6] + cnt[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);
  q = 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]++;
    p[i].id = 0;
  }
  for (int i = 1; i <= mx; i++) sx[i] += sx[i - 1];
  for (int i = 1; i <= my; i++) sy[i] += sy[i - 1];
  sort(cnt + 1, cnt + 10);
  copy(cnt + 1, cnt + 10, c + 1);
  int cur = 0;
  do {
    solve(cur, 0);
  } while (next_permutation(cnt + 1, cnt + 10));
  sort(p + 1, p + q + 1);
  for (int i = 1; i <= q; i++) {
    if (p[i].id == 0)
      ins(p[i].y);
    else
      ans[p[i].id] = qry(p[i].y);
  }
  copy(c + 1, c + 10, cnt + 1);
  cur = rk = 0;
  do {
    if (solve(cur, 1)) return 0;
  } while (next_permutation(cnt + 1, cnt + 10));
  puts("-1");
  return 0;
}
