#include <bits/stdc++.h>
using namespace std;
const int M = (int)1e5 + 5, MM = M * 20;
int n;
struct W {
  int x, y;
  bool operator<(const W &a) const { return x < a.x; }
} Pt[M];
int Rt[M];
int plx[M], xsz, ply[M], ysz;
int A[10];
int Lson[MM], Rson[MM], val[MM], tot;
void update(int L, int R, int &p, int op, int x, int v) {
  p = ++tot;
  Lson[p] = Lson[op];
  Rson[p] = Rson[op];
  val[p] = val[op] + v;
  if (L == R) return;
  int mid = (L + R) >> 1;
  if (mid >= x)
    update(L, mid, Lson[p], Lson[op], x, v);
  else
    update(mid + 1, R, Rson[p], Rson[op], x, v);
}
int mark[10];
int a[10];
int query(int L, int R, int p, int v) {
  if (p == 0) return -1;
  if (val[p] < v) return -1;
  if (L == R) {
    if (val[p] == v) return L;
    return -1;
  }
  int mid = (L + R) >> 1;
  if (val[Lson[p]] < v)
    return query(mid + 1, R, Rson[p], v - val[Lson[p]]);
  else
    return query(L, mid, Lson[p], v);
}
int query(int L, int R, int p, int l, int r) {
  if (p == 0) return 0;
  if (L == l && R == r) return val[p];
  int mid = (L + R) >> 1;
  if (mid >= r)
    return query(L, mid, Lson[p], l, r);
  else if (mid < l)
    return query(mid + 1, R, Rson[p], l, r);
  else
    return query(L, mid, Lson[p], l, mid) +
           query(mid + 1, R, Rson[p], mid + 1, r);
}
void dfs(int x) {
  if (x == 10) {
    int s1 = A[a[1]] + A[a[4]] + A[a[7]], s2 = s1 + A[a[2]] + A[a[5]] + A[a[8]];
    int L = 1, R = xsz, mid, ansx1 = -1, ansx2 = -1;
    while (L <= R) {
      mid = (L + R) >> 1;
      if (val[Rt[mid]] > s1)
        R = mid - 1;
      else if (val[Rt[mid]] < s1)
        L = mid + 1;
      else {
        ansx1 = mid;
        break;
      }
    }
    if (ansx1 == -1) return;
    L = 1, R = xsz;
    while (L <= R) {
      mid = (L + R) >> 1;
      if (val[Rt[mid]] > s2)
        R = mid - 1;
      else if (val[Rt[mid]] < s2)
        L = mid + 1;
      else {
        ansx2 = mid;
        break;
      }
    }
    if (ansx2 == -1) return;
    int ansy11 = query(1, ysz, Rt[ansx1], A[a[1]]);
    int ansy12 = query(1, ysz, Rt[ansx2], A[a[1]] + A[a[2]]);
    int ansy13 = query(1, ysz, Rt[xsz], A[a[1]] + A[a[2]] + A[a[3]]);
    int ansy21 = query(1, ysz, Rt[ansx1], A[a[1]] + A[a[4]]);
    int ansy22 =
        query(1, ysz, Rt[ansx2], A[a[1]] + A[a[2]] + A[a[4]] + A[a[5]]);
    int ansy23 =
        query(1, ysz, Rt[xsz],
              A[a[1]] + A[a[2]] + A[a[3]] + A[a[4]] + A[a[5]] + A[a[6]]);
    int mxansy1 = max(ansy11, max(ansy12, ansy13));
    int mxansy2 = max(ansy21, max(ansy22, ansy23));
    if (query(1, ysz, Rt[ansx1], 1, mxansy1) != A[a[1]]) return;
    if (query(1, ysz, Rt[ansx2], 1, mxansy1) != A[a[1]] + A[a[2]]) return;
    if (query(1, ysz, Rt[xsz], 1, mxansy1) != A[a[1]] + A[a[2]] + A[a[3]])
      return;
    if (query(1, ysz, Rt[ansx1], 1, mxansy2) != A[a[1]] + A[a[4]]) return;
    if (query(1, ysz, Rt[ansx2], 1, mxansy2) !=
        A[a[1]] + A[a[2]] + A[a[4]] + A[a[5]])
      return;
    if (query(1, ysz, Rt[xsz], 1, mxansy2) !=
        A[a[1]] + A[a[2]] + A[a[3]] + A[a[4]] + A[a[5]] + A[a[6]])
      return;
    if (ansx1 == ansx2)
      printf("%.10f %.10f\n", plx[ansx1 - 1] + 0.01, plx[ansx2 - 1] + 0.09);
    else
      printf("%.10f %.10f\n", plx[ansx1 - 1] + 0.05, plx[ansx2 - 1] + 0.05);
    if (mxansy1 == mxansy2)
      printf("%.10f %.10f\n", ply[mxansy1 - 1] + 0.01, ply[mxansy2 - 1] + 0.09);
    else
      printf("%.10f %.10f\n", ply[mxansy1 - 1] + 0.05, ply[mxansy2 - 1] + 0.05);
    exit(0);
    return;
  }
  for (int i = 1; i <= 9; i++)
    if (mark[i] == 0) {
      mark[i] = 1;
      a[x] = i;
      dfs(x + 1);
      mark[i] = 0;
    }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &Pt[i].x, &Pt[i].y);
    plx[xsz++] = Pt[i].x, ply[ysz++] = Pt[i].y;
  }
  sort(Pt + 1, Pt + n + 1);
  sort(plx, plx + xsz), xsz = unique(plx, plx + xsz) - plx;
  sort(ply, ply + ysz), ysz = unique(ply, ply + ysz) - ply;
  for (int i = 1, j = 1, y; i <= xsz; i++) {
    Rt[i] = Rt[i - 1];
    while (j <= n && Pt[j].x == plx[i - 1]) {
      y = lower_bound(ply, ply + ysz, Pt[j].y) - ply + 1;
      update(1, ysz, Rt[i], Rt[i], y, 1);
      j++;
    }
  }
  for (int i = 1; i <= 9; i++) scanf("%d", &A[i]);
  dfs(1);
  puts("-1");
  return 0;
}
