#include <bits/stdc++.h>
using namespace std;
int n, i, j, k, l, r, u, d;
int a[15], p[15], pp[15], q[100005], sum1[100005], sum2[100005], sum3[100005];
bool use[15];
struct node {
  int x, y;
} t[100005];
inline bool cmpx(const node &a, const node &b) { return a.x < b.x; }
inline bool cmpy(const int &a, const int &b) { return t[a].y < t[b].y; }
void dfs2(int x) {
  if (x == 10) {
    u = a[p[1]] + a[p[4]] + a[p[7]];
    d = n - a[p[3]] - a[p[6]] - a[p[9]];
    if (t[q[u]].y == t[q[u + 1]].y) return;
    if (t[q[d]].y == t[q[d + 1]].y) return;
    if (sum1[u] != a[p[1]]) return;
    if (sum2[u] != a[p[4]]) return;
    if (sum3[u] != a[p[7]]) return;
    if (sum1[d] - sum1[u] != a[p[2]]) return;
    if (sum2[d] - sum2[u] != a[p[5]]) return;
    if (sum3[d] - sum3[u] != a[p[8]]) return;
    if (sum1[n] - sum1[d] != a[p[3]]) return;
    if (sum2[n] - sum2[d] != a[p[6]]) return;
    if (sum3[n] - sum3[d] != a[p[9]]) return;
    printf("%lf %lf\n", t[l].x + 0.5, t[r].x + 0.5);
    printf("%lf %lf\n", t[q[u]].y + 0.5, t[q[d]].y + 0.5);
    exit(0);
  }
  p[x] = pp[x];
  p[x + 1] = pp[x + 1];
  p[x + 2] = pp[x + 2];
  dfs2(x + 3);
  p[x] = pp[x];
  p[x + 1] = pp[x + 2];
  p[x + 2] = pp[x + 1];
  dfs2(x + 3);
  p[x] = pp[x + 1];
  p[x + 1] = pp[x];
  p[x + 2] = pp[x + 2];
  dfs2(x + 3);
  p[x] = pp[x + 1];
  p[x + 1] = pp[x + 2];
  p[x + 2] = pp[x];
  dfs2(x + 3);
  p[x] = pp[x + 2];
  p[x + 1] = pp[x + 1];
  p[x + 2] = pp[x];
  dfs2(x + 3);
  p[x] = pp[x + 2];
  p[x + 1] = pp[x];
  p[x + 2] = pp[x + 1];
  dfs2(x + 3);
}
void dfs(int x) {
  if (x == 10) {
    int i;
    l = a[p[1]] + a[p[2]] + a[p[3]];
    r = n - a[p[7]] - a[p[8]] - a[p[9]];
    if (t[l].x == t[l + 1].x) return;
    if (t[r].x == t[r + 1].x) return;
    for (i = 1; i <= n; ++i) {
      sum1[i] = sum1[i - 1];
      sum2[i] = sum2[i - 1];
      sum3[i] = sum3[i - 1];
      if (q[i] <= l)
        ++sum1[i];
      else if (q[i] <= r)
        ++sum2[i];
      else
        ++sum3[i];
    }
    for (i = 1; i <= 9; ++i) pp[i] = p[i];
    dfs2(1);
    for (i = 1; i <= 9; ++i) p[i] = pp[i];
    return;
  }
  int i;
  if (x % 3 == 1)
    i = 1;
  else
    i = p[x - 1];
  for (; i <= 9; ++i)
    if (!use[i]) {
      use[i] = true;
      p[x] = i;
      dfs(x + 1);
      use[i] = false;
    }
}
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d%d", &t[i].x, &t[i].y), q[i] = i;
  for (i = 1; i <= 9; ++i) scanf("%d", &a[i]);
  sort(t + 1, t + n + 1, cmpx);
  sort(q + 1, q + n + 1, cmpy);
  dfs(1);
  printf("-1\n");
}
