#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 15;
const int maxp = 100000 * 20 + 15;
struct Node {
  int x, y, ry, rx;
  Node() { x = y = ry = rx = 0; }
} a[maxn];
struct Point {
  int l, r, sum;
  Point() { l = r = sum = 0; }
  Point(int l, int r, int sum) : l(l), r(r), sum(sum) {}
} tree[maxp];
int tot, qq[15], gg[15], dd[15], lin[15];
bool boo[15];
int root[maxn];
int n;
int dy[maxn], dy2[maxn];
int sx, sum[maxn], sy;
bool cm1(Node a, Node b) { return a.x < b.x; }
bool cm2(Node a, Node b) { return a.y < b.y; }
int inser(int root, int l, int r, int x) {
  if (l > x || r < x) return root;
  int now = ++tot;
  tree[now] = tree[root];
  tree[now].sum++;
  if (l == r) return now;
  int mid = (l + r) >> 1;
  tree[now].l = inser(tree[now].l, l, mid, x);
  tree[now].r = inser(tree[now].r, mid + 1, r, x);
  return now;
}
int found(int root, int l, int r, int x) {
  if (l == r) {
    if (tree[root].sum != x) return -1;
    return l;
  }
  int mid = (l + r) >> 1;
  if (tree[tree[root].l].sum >= x) return found(tree[root].l, l, mid, x);
  return found(tree[root].r, mid + 1, r, x - tree[tree[root].l].sum);
}
int found2(int root, int l, int r, int x) {
  if (l > x) return 0;
  int mid = (l + r) >> 1;
  if (mid <= x)
    return tree[tree[root].l].sum + found2(tree[root].r, mid + 1, r, x);
  return found2(tree[root].l, l, mid, x);
}
bool sorr(int now) {
  if (now > 9) {
    for (int i = 1; i <= 9; i++) gg[lin[i]] = qq[i];
    for (int i = 1; i <= 9; i++) dd[i] = gg[i];
    for (int i = 1; i <= 9; i++) gg[i] += gg[i - 1];
    int l = 0, r = sx, midd;
    while (l + 1 < r) {
      midd = (l + r) >> 1;
      if (sum[midd] >= gg[3])
        r = midd;
      else
        l = midd;
    }
    int x1 = r;
    if (sum[x1] != gg[3]) return false;
    l = x1, r = sx;
    while (l + 1 < r) {
      midd = (l + r) >> 1;
      if (sum[midd] >= gg[6])
        r = midd;
      else
        l = midd;
    }
    int x2 = r;
    if (sum[x2] != gg[6]) return false;
    int y1 = max(found(root[x1], 1, sy, gg[1]),
                 found(root[x2], 1, sy, gg[1] + dd[4]));
    y1 = max(y1, found(root[sx], 1, sy, gg[1] + dd[4] + dd[7]));
    if (y1 == -1) return false;
    int y2 = max(found(root[x1], 1, sy, gg[2]),
                 found(root[x2], 1, sy, gg[2] + dd[4] + dd[5]));
    y2 = max(y2, found(root[sx], 1, sy, gg[2] + dd[4] + dd[5] + dd[7] + dd[8]));
    if (y2 == -1) return false;
    if (found2(root[x1], 1, sy, y1) != dd[1]) return false;
    if (found2(root[x1], 1, sy, y2) != gg[2]) return false;
    if (found2(root[x2], 1, sy, y1) - dd[1] != dd[4]) return false;
    if (found2(root[x2], 1, sy, y2) - gg[2] - dd[4] != dd[5]) return false;
    if (found2(root[sx], 1, sy, y1) - dd[1] - dd[4] != dd[7]) return false;
    if (found2(root[sx], 1, sy, y2) - gg[2] - dd[4] - dd[5] - dd[7] != dd[8])
      return false;
    printf("%.9lf %.9lf\n", 0.5 + dy[x1], 0.5 + dy[x2]);
    printf("%.9lf %.9lf\n", 0.5 + dy2[y1], 0.5 + dy2[y2]);
    return true;
  }
  for (int i = 1; i <= 9; i++)
    if (!boo[i]) {
      boo[i] = true;
      lin[now] = i;
      if (sorr(now + 1)) return true;
      boo[i] = false;
    }
  return false;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d%d", &a[i].x, &a[i].y), a[i].rx = a[i].x, a[i].ry = a[i].y;
  for (int i = 1; i <= 9; i++) scanf("%d", &qq[i]);
  sort(a + 1, a + n + 1, cm1);
  sum[sx = 1] = 1;
  dy[1] = a[1].rx;
  a[1].x = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i].rx != a[i - 1].rx) sx++, dy[sx] = a[i].rx;
    sum[sx]++;
    a[i].x = sx;
  }
  for (int i = 1; i <= sx; i++) sum[i] += sum[i - 1];
  sort(a + 1, a + n + 1, cm2);
  sy = 1;
  a[1].y = 1;
  dy2[1] = a[1].ry;
  for (int i = 2; i <= n; i++) {
    if (a[i].ry != a[i - 1].ry) sy++, dy2[sy] = a[i].ry;
    a[i].y = sy;
  }
  sort(a + 1, a + n + 1, cm1);
  for (int i = 1; i <= n; i++)
    root[a[i].x] = inser(root[a[i - 1].x], 1, sy, a[i].y);
  if (!sorr(1)) printf("-1\n");
  return 0;
}
