Problem: A country called Flatland is an infinite two-dimensional plane. Flatland has n cities, each of them is a point on the plane.

Flatland is ruled by king Circle IV. Circle IV has 9 sons. He wants to give each of his sons part of Flatland to rule. For that, he wants to draw four distinct straight lines, such that two of them are parallel to the Ox axis, and two others are parallel to the Oy axis. At that, no straight line can go through any city. Thus, Flatland will be divided into 9 parts, and each son will be given exactly one of these parts. Circle IV thought a little, evaluated his sons' obedience and decided that the i-th son should get the part of Flatland that has exactly ai cities.

Help Circle find such four straight lines that if we divide Flatland into 9 parts by these lines, the resulting parts can be given to the sons so that son number i got the part of Flatland which contains ai cities.

Input

The first line contains integer n (9 ≤ n ≤ 105) — the number of cities in Flatland. Next n lines each contain two space-separated integers: xi, yi ( - 109 ≤ xi, yi ≤ 109) — the coordinates of the i-th city. No two cities are located at the same point. The last line contains nine space-separated integers: <image>.

Output

If there is no solution, print a single integer -1.

Otherwise, print in the first line two distinct real space-separated numbers: x1, x2 — the abscissas of the straight lines that are parallel to the Oy axis. And in the second line print two distinct real space-separated numbers: y1, y2 — the ordinates of the straight lines, parallel to the Ox. If there are multiple solutions, print any of them. 

When the answer is being checked, a city is considered to lie on a straight line, if the distance between the city and the line doesn't exceed 10 - 6. Two straight lines are considered the same if the distance between them doesn't exceed 10 - 6.

Examples

Input

9
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3
1 1 1 1 1 1 1 1 1


Output

1.5000000000 2.5000000000
1.5000000000 2.5000000000


Input

15
4 4
-1 -3
1 5
3 -4
-4 4
-1 1
3 -3
-4 -5
-3 3
3 2
4 1
-4 2
-2 -5
-3 4
-1 4
2 1 2 1 2 1 3 2 1


Output

-3.5000000000 2.0000000000
3.5000000000 -1.0000000000


Input

10
-2 10
6 0
-16 -6
-4 13
-4 -2
-17 -10
9 15
18 16
-5 2
10 -5
2 1 1 1 1 1 1 1 1


Output

-1

Note

The solution for the first sample test is shown below:

<image>

The solution for the second sample test is shown below:

<image>

There is no solution for the third sample test.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
const int N = 100000;
struct Point {
  int x, y;
  Point() {}
  Point(int _x, int _y) : x(_x), y(_y) {}
  void in() { scanf("%d%d", &x, &y); }
} p[N];
struct node {
  node *c[2], *fa;
  int val;
  int sz;
  int id;
  bool d() { return fa->c[0] == this; }
  void setc(int s, node *who) {
    c[s] = who;
    who->fa = this;
  }
  void up() { sz = c[0]->sz + c[1]->sz + 1; }
} NODE[1800000], *null = NODE;
int top;
struct Splay_tree {
  node *root;
  void Rotate(node *x, int f) {
    node *y = x->fa;
    y->setc(!f, x->c[f]);
    x->fa = y->fa;
    if (y->fa != null) y->fa->c[!y->d()] = x;
    x->setc(f, y);
    y->up();
  }
  void Splay(node *x, node *goal) {
    while (x->fa != goal) {
      if (x->fa->fa == goal)
        Rotate(x, x->d());
      else {
        int f = x->fa->d();
        (f == x->d()) ? Rotate(x->fa, f) : Rotate(x, !f);
        Rotate(x, f);
      }
    }
    x->up();
    if (goal == null) root = x;
  }
  node *new_node(int v) {
    node *tmp = &NODE[++top];
    tmp->val = v;
    tmp->c[0] = tmp->c[1] = null;
    tmp->fa = null;
    tmp->id = top;
    tmp->sz = 1;
    return tmp;
  }
  void clear() { root = null; }
  void insert(node *&x, node *y) {
    if (x == null) {
      x = y;
      return;
    }
    if (y->val < x->val) {
      insert(x->c[0], y);
      x->c[0]->fa = x;
    } else {
      insert(x->c[1], y);
      x->c[1]->fa = x;
    }
    x->up();
  }
  void insert(int yv) {
    node *tmp = new_node(yv);
    insert(root, tmp);
    Splay(tmp, null);
  }
  node *find(node *x, int v) {
    if (x == null) return x;
    if (x->val <= v) {
      node *tmp = find(x->c[1], v);
      return tmp == null ? x : tmp;
    } else {
      return find(x->c[0], v);
    }
  }
  int query(int yv) {
    node *tmp = find(root, yv);
    if (tmp != null) Splay(tmp, null);
    return tmp == null ? 0 : tmp->c[0]->sz + 1;
  }
} spt[N << 2];
void prepare() {
  top = 0;
  null->fa = null->c[0] = null->c[1] = NULL;
  null->val = -2e9;
  null->sz = 0;
  null->id = 0;
}
void build(int l, int r, int x) {
  spt[x].clear();
  if (l == r) {
    return;
  }
  int m = l + r >> 1;
  build(l, m, x + x);
  build(m + 1, r, x + x + 1);
}
void insert(int xv, int yv, int l, int r, int x) {
  spt[x].insert(yv);
  if (l == r) return;
  int m = l + r >> 1;
  if (xv <= m) insert(xv, yv, l, m, x + x);
  if (xv > m) insert(xv, yv, m + 1, r, x + x + 1);
}
int query(int Le, int Ri, int yv, int l, int r, int x) {
  if (Le <= l && r <= Ri) {
    return spt[x].query(yv);
  }
  int m = l + r >> 1;
  int ans = 0;
  if (Le <= m) ans += query(Le, Ri, yv, l, m, x + x);
  if (Ri > m) ans += query(Le, Ri, yv, m + 1, r, x + x + 1);
  return ans;
}
int cmp1(const Point &a, const Point &b) { return a.x < b.x; }
int cmp2(const Point &a, const Point &b) { return a.y < b.y; }
std::vector<Point> by_x, by_y;
std::vector<int> allx;
int n, a[10];
int main() {
  prepare();
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    p[i].in();
    by_x.push_back(p[i]);
    by_y.push_back(p[i]);
    allx.push_back(p[i].x);
  }
  for (int i = 0; i < 9; i++) scanf("%d", &a[i]);
  std::sort(by_x.begin(), by_x.end(), cmp1);
  std::sort(by_y.begin(), by_y.end(), cmp2);
  std::sort(allx.begin(), allx.end());
  allx.erase(unique(allx.begin(), allx.end()), allx.end());
  build(0, allx.size() - 1, 1);
  for (int i = 0; i < n; i++) {
    int id = lower_bound(allx.begin(), allx.end(), p[i].x) - allx.begin();
    insert(id, p[i].y, 0, allx.size() - 1, 1);
  }
  std::sort(a, a + 9);
  bool can = false;
  int x1, x2, y1, y2;
  do {
    int s1 = a[0] + a[3] + a[6];
    int s2 = a[0] + a[1] + a[3] + a[4] + a[6] + a[7];
    x1 = by_x[s1 - 1].x;
    x2 = by_x[s2 - 1].x;
    int flag = 0;
    if (by_x[s1].x > x1) flag++;
    if (by_x[s2].x > x2) flag++;
    s1 = a[6] + a[7] + a[8];
    s2 = a[6] + a[7] + a[8] + a[3] + a[4] + a[5];
    y1 = by_y[s1 - 1].y;
    y2 = by_y[s2 - 1].y;
    if (by_y[s1].y > y1) flag++;
    if (by_y[s2].y > y2) flag++;
    if (flag == 4) {
      int LL = std::lower_bound(allx.begin(), allx.end(), x1) - allx.begin();
      int RR = std::lower_bound(allx.begin(), allx.end(), x2) - allx.begin();
      int a6 = query(0, LL, y1, 0, allx.size() - 1, 1);
      if (a6 != a[6]) continue;
      int a6_a7 = query(0, RR, y1, 0, allx.size() - 1, 1);
      if (a6_a7 != a[6] + a[7]) continue;
      int a6_a3 = query(0, LL, y2, 0, allx.size() - 1, 1);
      if (a6_a3 != a[3] + a[6]) continue;
      int a6_a4 = query(0, RR, y2, 0, allx.size() - 1, 1);
      if (a6_a4 != a[3] + a[6] + a[4] + a[7]) continue;
      can = true;
      break;
    }
  } while (std::next_permutation(a, a + 9));
  if (can) {
    printf("%lf %lf\n%lf %lf\n", x1 + 0.5, x2 + 0.5, y1 + 0.5, y2 + 0.5);
  } else {
    puts("-1");
  }
  return 0;
}