#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
struct node {
  int sum, ch[2];
} t[N * 60];
int cnt, n;
void update(int& x, int y, int p, int val, int lp = 1, int rp = n) {
  x = ++cnt;
  t[x] = t[y];
  t[x].sum += val;
  if (lp == rp) return;
  int mid = (lp + rp) >> 1;
  if (p <= mid)
    update(t[x].ch[0], t[y].ch[0], p, val, lp, mid);
  else
    update(t[x].ch[1], t[y].ch[1], p, val, mid + 1, rp);
}
struct point {
  int x, y;
  bool operator<(const point& a) const { return x < a.x; }
} po[N];
int px[N], py[N], rt[N], a[15], per[15], num[15];
int query(int k, int x, int y, int lp = 1, int rp = n) {
  if (lp == rp) return lp;
  int mid = (lp + rp) >> 1;
  int v = t[t[x].ch[0]].sum - t[t[y].ch[0]].sum;
  if (k <= v)
    return query(k, t[x].ch[0], t[y].ch[0], lp, mid);
  else
    return query(k - v, t[x].ch[1], t[y].ch[1], mid + 1, rp);
}
int ask(int l, int r, int x, int y, int lp = 1, int rp = n) {
  if (l > rp || lp > r) return 0;
  if (lp >= l && rp <= r) return t[x].sum - t[y].sum;
  int mid = (lp + rp) >> 1;
  return ask(l, r, t[x].ch[0], t[y].ch[0], lp, mid) +
         ask(l, r, t[x].ch[1], t[y].ch[1], mid + 1, rp);
}
vector<int> tmpx, tmpy;
bool solve() {
  int l, r, ans, mid;
  int x = num[1] + num[2] + num[3];
  l = 0, r = n, ans = n + 1;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (t[rt[mid]].sum >= x)
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  if (t[rt[ans]].sum != x) return 0;
  int px1 = ans;
  int y = num[4] + num[5] + num[6];
  l = px1 + 1, r = n, ans = n + 1;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (t[rt[mid]].sum >= x + y)
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  if (t[rt[ans]].sum != x + y) return 0;
  int px2 = ans;
  x = num[1] + num[4] + num[7];
  int py1 = query(x, rt[n], 0);
  if (ask(1, py1, rt[n], 0) != x) return 0;
  y = num[2] + num[5] + num[8];
  int py2 = query(x + y, rt[n], 0);
  if (ask(1, py2, rt[n], 0) != x + y) return 0;
  if (ask(1, py1, rt[px1], 0) != num[1]) return 0;
  if (ask(1, py1, rt[px2], rt[px1]) != num[4]) return 0;
  if (ask(1, py1, rt[n], rt[px2]) != num[7]) return 0;
  if (ask(py1 + 1, py2, rt[px1], 0) != num[2]) return 0;
  if (ask(py1 + 1, py2, rt[px2], rt[px1]) != num[5]) return 0;
  if (ask(py1 + 1, py2, rt[n], rt[px2]) != num[8]) return 0;
  if (ask(py2 + 1, n, rt[px1], 0) != num[3]) return 0;
  if (ask(py2 + 1, n, rt[px2], rt[px1]) != num[6]) return 0;
  if (ask(py2 + 1, n, rt[n], rt[px2]) != num[9]) return 0;
  printf("%.6lf %.6lf\n", tmpx[px1 - 1] + 0.5, tmpx[px2 - 1] + 0.5);
  printf("%.6lf %.6lf\n", tmpy[py1 - 1] + 0.5, tmpy[py2 - 1] + 0.5);
  return 1;
}
int main() {
  int x, y;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &x, &y);
    tmpx.push_back(x);
    tmpy.push_back(y);
    px[i] = x, py[i] = y;
  }
  sort(tmpx.begin(), tmpx.end());
  sort(tmpy.begin(), tmpy.end());
  tmpx.erase(unique(tmpx.begin(), tmpx.end()), tmpx.end());
  tmpy.erase(unique(tmpy.begin(), tmpy.end()), tmpy.end());
  for (int i = 1; i <= n; ++i) {
    po[i].x = lower_bound(tmpx.begin(), tmpx.end(), px[i]) - tmpx.begin() + 1;
    po[i].y = lower_bound(tmpy.begin(), tmpy.end(), py[i]) - tmpy.begin() + 1;
  }
  sort(po + 1, po + n + 1);
  for (int i = 1, p = 1; i <= n; ++i) {
    rt[i] = rt[i - 1];
    for (; po[p].x == i; ++p) update(rt[i], rt[i], po[p].y, 1);
  }
  for (int i = 1; i <= 9; ++i) scanf("%d", &a[i]), per[i] = i;
  do {
    for (int i = 1; i <= 9; ++i) num[i] = a[per[i]];
    if (solve()) return 0;
  } while (next_permutation(per + 1, per + 10));
  puts("-1");
  return 0;
}
