#include <bits/stdc++.h>
using namespace std;
const int N = 370000;
struct P {
  int v[8], y1, y2, x1, x2, fy1, fy2;
} zt[N];
int a[9], at[9], x[N], y[N], k;
bool u[9];
void dfs(int x) {
  if (x == 9) {
    zt[k].v[0] = at[a[0]];
    zt[k].v[1] = at[a[0]] + at[a[3]];
    zt[k].v[2] = at[a[0]] + at[a[3]] + at[a[6]];
    zt[k].v[3] = at[a[0]] + at[a[1]];
    zt[k].v[4] = at[a[0]] + at[a[3]] + at[a[1]] + at[a[4]];
    zt[k].v[5] =
        at[a[0]] + at[a[3]] + at[a[6]] + at[a[1]] + at[a[4]] + at[a[7]];
    zt[k].v[6] = at[a[0]] + at[a[1]] + at[a[2]];
    zt[k].v[7] = zt[k].v[6] + at[a[3]] + at[a[4]] + at[a[5]];
    zt[k].y1 = zt[k].y2 = zt[k].x1 = -1;
    k++;
    return;
  }
  for (int i = 0; i < 9; i++) {
    if (!u[i]) {
      a[x] = i;
      u[i] = true;
      dfs(x + 1);
      u[i] = false;
    }
  }
}
bool cmp1(int x, int y) { return zt[x].v[6] < zt[y].v[6]; }
bool cmp2(int x, int y) { return zt[x].v[7] < zt[y].v[7]; }
bool cmp3(int xx, int yy) { return y[xx] < y[yy]; }
bool cmp4(int x, int y) { return zt[x].v[2] < zt[y].v[2]; }
bool cmp5(int x, int y) { return zt[x].v[5] < zt[y].v[5]; }
bool cmp6(int xx, int yy) { return x[xx] < x[yy]; }
int b[N], c[N], d[N], f[N], C[N];
int lowbit(int x) { return x & (-x); }
int getsum(int x) {
  int r = 0;
  while (x > 0) {
    r += C[x];
    x -= lowbit(x);
  }
  return r;
}
void up(int x) {
  while (x < N) {
    C[x]++;
    x += lowbit(x);
  }
}
int main() {
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d%d", x + i, y + i);
  for (i = 0; i < 9; i++) scanf("%d", at + i);
  k = 0;
  dfs(0);
  for (i = 0; i < n; i++) d[i] = i;
  for (i = 0; i < 362880; i++) b[i] = c[i] = i;
  sort(b, b + 362880, cmp1);
  sort(c, c + 362880, cmp2);
  sort(d, d + n, cmp3);
  int j = 0, h = 0;
  k = 1;
  for (i = 0; i < n; i++) {
    f[d[i]] = k;
    if (i == n - 1 || y[d[i]] != y[d[i + 1]]) {
      while (j < 362880 && zt[b[j]].v[6] <= i + 1) {
        if (zt[b[j]].v[6] == i + 1) zt[b[j]].y1 = y[d[i]];
        if (zt[b[j]].v[6] == i + 1) zt[b[j]].fy1 = k;
        j++;
      }
      while (h < 362880 && zt[c[h]].v[7] <= i + 1) {
        if (zt[c[h]].v[7] == i + 1) zt[c[h]].y2 = y[d[i]];
        if (zt[c[h]].v[7] == i + 1) zt[c[h]].fy2 = k;
        h++;
      }
      k++;
    }
  }
  sort(b, b + 362880, cmp4);
  sort(c, c + 362880, cmp5);
  sort(d, d + n, cmp6);
  j = 0, h = 0;
  int rt = -1;
  for (i = 0; i < n && rt == -1; i++) {
    up(f[d[i]]);
    if (i == n - 1 || x[d[i]] != x[d[i + 1]]) {
      while (j < 362880 && zt[b[j]].v[2] <= i + 1) {
        if (zt[b[j]].v[2] == i + 1) {
          if (zt[b[j]].y1 != -1 && zt[b[j]].y2 != -1) {
            if (getsum(zt[b[j]].fy1) == zt[b[j]].v[0] &&
                getsum(zt[b[j]].fy2) == zt[b[j]].v[1]) {
              zt[b[j]].x1 = x[d[i]];
            }
          }
        }
        j++;
      }
      while (h < 362880 && zt[c[h]].v[5] <= i + 1) {
        if (zt[c[h]].v[5] == i + 1) {
          if (zt[c[h]].x1 != -1) {
            if (getsum(zt[c[h]].fy1) == zt[c[h]].v[3] &&
                getsum(zt[c[h]].fy2) == zt[c[h]].v[4]) {
              zt[c[h]].x2 = x[d[i]];
              rt = c[h];
              break;
            }
          }
        }
        h++;
      }
    }
  }
  if (rt == -1)
    puts("-1");
  else
    printf("%.9lf %.9lf\n%.9lf %.9lf\n", 0.5 + zt[rt].x1, 0.5 + zt[rt].x2,
           0.5 + zt[rt].y1, 0.5 + zt[rt].y2);
  return 0;
}
