#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
struct Node {
  Node *lchild, *rchild;
  int sum;
} node[maxn * 40], *head[maxn];
int tot;
void initnode(Node *curr) {
  curr->lchild = curr->rchild = NULL;
  curr->sum = 0;
  return;
}
void copypath(int x, Node *curr, Node *last, int ll, int rr) {
  if (last == NULL) return;
  *curr = *last;
  int tm = (ll + rr) >> 1;
  if (x <= tm) {
    curr->lchild = &node[++tot];
    initnode(curr->lchild);
    copypath(x, curr->lchild, last->lchild, ll, tm);
  } else {
    curr->rchild = &node[++tot];
    initnode(curr->rchild);
    copypath(x, curr->rchild, last->rchild, tm + 1, rr);
  }
}
void insert(int x, int v, Node *curr, int ll, int rr) {
  if (ll == rr) {
    curr->sum += v;
    return;
  }
  int tm = (ll + rr) >> 1;
  if (x <= tm) {
    if (curr->lchild == NULL) {
      curr->lchild = &node[++tot];
      initnode(curr->lchild);
    }
    insert(x, v, curr->lchild, ll, tm);
  } else {
    if (curr->rchild == NULL) {
      curr->rchild = &node[++tot];
      initnode(curr->rchild);
    }
    insert(x, v, curr->rchild, tm + 1, rr);
  }
  curr->sum = 0;
  if (curr->lchild) curr->sum += curr->lchild->sum;
  if (curr->rchild) curr->sum += curr->rchild->sum;
}
int query(Node *l, Node *r, int k, int ll, int rr) {
  if (ll == rr) return ll;
  int rsum = 0;
  if (r && r->lchild) rsum += r->lchild->sum;
  if (l && l->lchild) rsum -= l->lchild->sum;
  int tm = (ll + rr) >> 1;
  if (rsum >= k)
    return query(l ? l->lchild : NULL, r->lchild, k, ll, tm);
  else
    return query(l ? l->rchild : NULL, r->rchild, k - rsum, tm + 1, rr);
}
struct Point {
  int x, y;
  void input() { scanf("%d%d", &x, &y); }
  bool operator<(const Point &t) const { return x < t.x; }
} p[maxn];
int a[10], n;
vector<int> yy;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    p[i].input();
    yy.push_back(p[i].y);
  }
  for (int i = 0; i < 9; i++) scanf("%d", a + i);
  sort(a, a + 9);
  sort(p, p + n);
  sort(yy.begin(), yy.end());
  yy.erase(unique(yy.begin(), yy.end()), yy.end());
  for (int i = 0; i <= n; i++) {
    head[i] = &node[i];
    initnode(head[i]);
  }
  tot = n + 1;
  for (int i = 0; i < n; i++) {
    p[i].y = lower_bound(yy.begin(), yy.end(), p[i].y) - yy.begin();
    copypath(p[i].y, head[i + 1], head[i], 0, yy.size() - 1);
    insert(p[i].y, 1, head[i + 1], 0, yy.size() - 1);
  }
  bool pd = true;
  do {
    int x1 = a[0] + a[1] + a[2];
    int x2 = x1 + a[3] + a[4] + a[5];
    if (p[x1].x == p[x1 - 1].x || p[x2].x == p[x2 - 1].x) continue;
    int y1l = 0, y1r = yy.size() - 1, y2l = 0, y2r = yy.size() - 1, tmp;
    y1l = max(y1l, query(head[0], head[x1], a[0], 0, yy.size() - 1));
    y2l = max(y2l, query(head[0], head[x1], a[0] + a[1], 0, yy.size() - 1));
    y1r = min(y1r, query(head[0], head[x1], a[0] + 1, 0, yy.size() - 1));
    y2r = min(y2r, query(head[0], head[x1], a[0] + a[1] + 1, 0, yy.size() - 1));
    y1l = max(y1l, query(head[x1], head[x2], a[3], 0, yy.size() - 1));
    y2l = max(y2l, query(head[x1], head[x2], a[3] + a[4], 0, yy.size() - 1));
    y1r = min(y1r, query(head[x1], head[x2], a[3] + 1, 0, yy.size() - 1));
    y2r =
        min(y2r, query(head[x1], head[x2], a[3] + a[4] + 1, 0, yy.size() - 1));
    y1l = max(y1l, query(head[x2], head[n], a[6], 0, yy.size() - 1));
    y2l = max(y2l, query(head[x2], head[n], a[6] + a[7], 0, yy.size() - 1));
    y1r = min(y1r, query(head[x2], head[n], a[6] + 1, 0, yy.size() - 1));
    y2r = min(y2r, query(head[x2], head[n], a[6] + a[7] + 1, 0, yy.size() - 1));
    if (y1l >= y1r || y2l >= y2r) continue;
    pd = false;
    printf("%.9f %.9f\n%.9f %.9f\n", 0.5 * (p[x1].x + p[x1 - 1].x),
           0.5 * (p[x2].x + p[x2 - 1].x), 0.5 * (yy[y1l] + yy[y1r]),
           0.5 * (yy[y2l] + yy[y2r]));
    break;
  } while (next_permutation(a, a + 9));
  if (pd) printf("-1\n");
  return 0;
}
