#include <bits/stdc++.h>
using namespace std;
int n;
const int max_n = 4 * 100000;
long long arr[10];
pair<long long, long long> point[max_n];
long long point_x[max_n];
long long point_y[max_n];
long long sum_x[3];
long long sum_y[3];
vector<long long> tree[max_n];
int l1x, l2x, l1y, l2y;
void build_tree(int node, int a, int b) {
  if (a >= b) return;
  if (a == b - 1) {
    tree[node].push_back(point[a].second);
    return;
  }
  int mid = (a + b) / 2;
  build_tree(2 * node, a, mid);
  build_tree(2 * node + 1, mid, b);
  int p1 = a;
  int p2 = mid;
  while (p1 < mid || p2 < b) {
    if (p1 == mid) {
      tree[node].push_back(tree[2 * node + 1][p2 - mid]);
      p2++;
    } else if (p2 == b) {
      tree[node].push_back(tree[2 * node][p1 - a]);
      p1++;
    } else if (tree[2 * node][p1 - a] < tree[2 * node + 1][p2 - mid]) {
      tree[node].push_back(tree[2 * node][p1 - a]);
      p1++;
    } else {
      tree[node].push_back(tree[2 * node + 1][p2 - mid]);
      p2++;
    }
  }
}
int get(int node, int a, int b, int i, int j, long long val) {
  if (a >= b || a >= j || b <= i) return 0;
  if (a >= i && b <= j)
    return upper_bound(tree[node].begin(), tree[node].end(), val) -
           tree[node].begin();
  int mid = (a + b) / 2;
  int g1 = get(2 * node, a, mid, i, j, val);
  int g2 = get(2 * node + 1, mid, b, i, j, val);
  return g1 + g2;
}
bool find_the_ans() {
  int sum1 = arr[1] + arr[4] + arr[7], sum2 = sum1 + arr[2] + arr[5] + arr[8],
      sum3 = arr[1] + arr[2] + arr[3], sum4 = sum3 + arr[4] + arr[5] + arr[6];
  l1x = point_x[sum1];
  l2x = point_x[sum2];
  l1y = point_y[sum3];
  l2y = point_y[sum4];
  if (l1x == point_x[sum1 + 1] || l2x == point_x[sum2 + 1] ||
      l1y == point_y[sum3 + 1] || l2y == point_y[sum4 + 1])
    return false;
  int res1 = arr[1];
  int res2 = arr[1] + arr[2];
  int res3 = res2 + arr[4] + arr[5];
  int res4 = arr[1] + arr[4];
  if (get(1, 1, n + 1, 1, sum1 + 1, l1y) != res1 ||
      get(1, 1, n + 1, 1, sum2 + 1, l1y) != res2 ||
      get(1, 1, n + 1, 1, sum2 + 1, l2y) != res3 ||
      get(1, 1, n + 1, 1, sum1 + 1, l2y) != res4)
    return false;
  return true;
}
int main() {
  cout << fixed << setprecision((5));
  cin >> n;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    cin >> point[i].first >> point[i].second;
    point_x[i] = point[i].first;
    point_y[i] = point[i].second;
  }
  sort(point + 1, point + n + 1);
  sort(point_x + 1, point_x + n + 1);
  sort(point_y + 1, point_y + n + 1);
  build_tree(1, 1, n + 1);
  for (int i = 1; i < 10; i++) cin >> arr[i];
  sort(arr + 1, arr + 10);
  while (1) {
    if (find_the_ans()) {
      long double ans1 = (long double)l1x + (long double)0.5;
      long double ans2 = (long double)l2x + (long double)0.5;
      long double ans3 = (long double)l1y + (long double)0.5;
      long double ans4 = (long double)l2y + (long double)0.5;
      cout << ans1 << ' ' << ans2 << endl;
      cout << ans3 << ' ' << ans4 << endl;
      return 0;
    }
    if (next_permutation(arr + 1, arr + 10))
      continue;
    else
      break;
  }
  cout << -1 << endl;
  return 0;
}
