#include <bits/stdc++.h>
using namespace std;
const int N = 100005, M = 362880;
struct _four {
  int a, b, c, d;
} t[M + 5], q[M + M + 5];
bool operator<(const _four &x, const _four &y) { return x.a < y.a; }
pair<int, int> p[N];
int n, tot;
bool flag[M + 5];
int a[10], P[10], dx[N], dy[N], h[N];
void Init() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &p[i].first, &p[i].second);
  for (int i = 1; i <= n; i++) {
    dx[i] = p[i].first;
    dy[i] = p[i].second;
  }
  sort(dx + 1, dx + n + 1);
  sort(dy + 1, dy + n + 1);
  for (int i = 1; i <= 9; i++) {
    P[i] = i;
    scanf("%d", a + i);
  }
  for (int i = 1; i <= M; i++) {
    t[i].a = a[P[1]] + a[P[2]] + a[P[3]];
    t[i].b = a[P[4]] + a[P[5]] + a[P[6]] + t[i].a;
    t[i].c = a[P[1]] + a[P[4]] + a[P[7]];
    t[i].d = a[P[2]] + a[P[5]] + a[P[8]] + t[i].c;
    flag[i] |= dx[t[i].a] == dx[t[i].a + 1];
    flag[i] |= dx[t[i].b] == dx[t[i].b + 1];
    flag[i] |= dy[t[i].c] == dy[t[i].c + 1];
    flag[i] |= dy[t[i].d] == dy[t[i].d + 1];
    t[i].a = dx[t[i].a];
    t[i].b = dx[t[i].b];
    t[i].c = dy[t[i].c];
    t[i].d = dy[t[i].d];
    next_permutation(P + 1, P + 10);
  }
  tot = unique(dx + 1, dx + n + 1) - dx - 1;
  for (int i = 1; i <= n; i++)
    p[i].first = lower_bound(dx + 1, dx + tot + 1, p[i].first) - dx;
  for (int i = 1; i <= M; i++) {
    t[i].a = lower_bound(dx + 1, dx + tot + 1, t[i].a) - dx;
    t[i].b = lower_bound(dx + 1, dx + tot + 1, t[i].b) - dx;
  }
  tot = unique(dy + 1, dy + n + 1) - dy - 1;
  for (int i = 1; i <= n; i++)
    p[i].second = lower_bound(dy + 1, dy + tot + 1, p[i].second) - dy;
  for (int i = 1; i <= M; i++) {
    t[i].c = lower_bound(dy + 1, dy + tot + 1, t[i].c) - dy;
    t[i].d = lower_bound(dy + 1, dy + tot + 1, t[i].d) - dy;
  }
  tot = 0;
  for (int i = 1; i <= 9; i++) P[i] = i;
  for (int i = 1; i <= M; i++) {
    if (!flag[i]) {
      q[++tot] = (_four){t[i].a, a[P[1]], a[P[3]], i};
      q[++tot] = (_four){t[i].b, a[P[1]] + a[P[4]], a[P[3]] + a[P[6]], i};
    }
    next_permutation(P + 1, P + 10);
  }
}
void Ins(int x) {
  for (; x <= n; x += ((x) & -(x))) h[x]++;
}
int Find(int x) {
  int ret = 0;
  for (; x; x -= ((x) & -(x))) ret += h[x];
  return ret;
}
void Work() {
  sort(q + 1, q + tot + 1);
  int j = 1;
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) {
    Ins(p[i].second);
    if (p[i].first != p[i + 1].first) {
      for (; j <= tot && q[j].a <= p[i].first; j++)
        if (Find(t[q[j].d].c) != q[j].b || i - Find(t[q[j].d].d) != q[j].c)
          flag[q[j].d] = 1;
    }
  }
  bool tf = 0;
  for (int i = 1; i <= M; i++)
    if (!flag[i]) {
      printf("%.1lf %.1lf %.1lf %.1lf\n", dx[t[i].a] + 0.5, dx[t[i].b] + 0.5,
             dy[t[i].c] + 0.5, dy[t[i].d] + 0.5);
      tf = 1;
      break;
    }
  if (!tf) puts("-1");
}
int main() {
  Init();
  Work();
  return 0;
}
