#include <bits/stdc++.h>   using namespace std;   const int maxn = 100100, INF = 0x7fffffff, _INF = 0x80000000;   class Splay_Tree {    public:     int tot, root;     struct Splay_Node {       int c[2], fa, key, cnt, size;       Splay_Node() {         c[0] = c[1] = fa = key = cnt = size = 0;         return;       }     } p[maxn + 10];     void Init() {       p[1].c[0] = p[1].size = tot = 2;       p[1].key = INF;       p[2].key = _INF;       p[1].cnt = p[2].cnt = p[2].size = p[2].fa = root = 1;       return;     }     inline bool Gr(int k) { return p[p[k].fa].c[0] != k; }     inline void Update(int k) {       p[k].size = p[k].cnt + p[p[k].c[0]].size + p[p[k].c[1]].size;       return;     }     void Rotate(int a, bool t) {       int b = p[a].c[t ^ 1];       if (p[b].fa = p[a].fa)         p[p[a].fa].c[Gr(a)] = b;       else         root = b;       if (p[a].c[t ^ 1] = p[b].c[t]) p[p[b].c[t]].fa = a;       p[b].c[t] = a;       p[a].fa = b;       Update(a);       Update(b);       return;     }     void Splay(int k, int t = 0) {       while (p[k].fa != t) {         int F = p[k].fa, G = p[F].fa;         if (G != t) {           if (Gr(k) != Gr(F)) {             Rotate(F, Gr(k) ^ 1);             Rotate(G, Gr(k) ^ 1);           } else {             Rotate(G, Gr(F) ^ 1);             Rotate(F, Gr(k) ^ 1);           }         } else           Rotate(F, Gr(k) ^ 1);       }       return;     }     int Insert(int k, int key) {       if (key != p[k].key) {         bool t = key > p[k].key;         while (p[k].c[t] && key != p[p[k].c[t]].key)           t = key > p[k = p[k].c[t]].key;         if (!p[k].c[t]) {           p[p[k].c[t] = ++tot].key = key;           p[tot].fa = k;           k = tot;         } else           k = p[k].c[t];       }       ++p[k].cnt;       ++p[k].size;       Splay(k);       return k;     }     int Rank(int k, int key) {       int rank = -1;       while (k && key != p[k].key) {         bool t = key > p[k].key;         if (t) rank += p[p[k].c[0]].size + p[k].cnt;         k = p[k].c[t];       }       if (k && key == p[k].key) rank += p[k].cnt;       return rank + p[p[k].c[0]].size;     }   } ST;   int n;   struct Point {     int x, y;   } P[maxn];   bool cmp1(Point a, Point b) { return a.x < b.x; }   bool cmp2(Point a, Point b) { return a.y < b.y; }   int v1[maxn], v2[maxn];   bool vis1[maxn], vis2[maxn];   int p[10], c[10];   int k = 0;   struct node1 {     int lx1, lx2, ly1, ly2, t1, t2, t3, t4;     bool flag;   } mes[maxn << 2];   int tot = -1, head[maxn];   struct node2 {     int p, next, idx1, idx2;   } edge[maxn << 4];   inline void Add(int u, int v, int idx1, int idx2) {     edge[++tot] = (node2){v, head[u], idx1, idx2};     head[u] = tot;     return;   }   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; ++i) scanf( %d%d , &P[i].x, &P[i].y);     for (int i = 1; i <= 9; ++i) {       p[i] = i;       scanf( %d , &c[i]);     }     sort(P + 1, P + n + 1, cmp1);     for (int i = 1, j, sum = 0; i <= n; i = j + 1) {       for (j = i; j < n && P[j].x == P[j + 1].x; ++j)         ;       v1[sum += j - i + 1] = P[i].x;       vis1[sum] = 1;     }     sort(P + 1, P + n + 1, cmp2);     for (int i = 1, j, sum = 0; i <= n; i = j + 1) {       for (j = i; j < n && P[j].y == P[j + 1].y; ++j)         ;       v2[sum += j - i + 1] = i;       vis2[sum] = 1;     }     memset(head, -1, sizeof(head));     do {       int t1 = c[p[1]] + c[p[4]] + c[p[7]], t2 = t1 + c[p[2]] + c[p[5]] + c[p[8]],           t3 = c[p[1]] + c[p[2]] + c[p[3]], t4 = t3 + c[p[4]] + c[p[5]] + c[p[6]];       if (vis1[t1] && vis1[t2] && vis2[t3] && vis2[t4]) {         mes[++k] = (node1){v1[t1],                            v1[t2],                            P[v2[t3]].y,                            P[v2[t4]].y,                            c[p[1]],                            c[p[1]] + c[p[2]],                            c[p[1]] + c[p[4]],                            c[p[1]] + c[p[2]] + c[p[4]] + c[p[5]],                            1};         Add(v2[t3], v1[t1], k, 1);         Add(v2[t3], v1[t2], k, 2);         Add(v2[t4], v1[t1], k, 3);         Add(v2[t4], v1[t2], k, 4);       }     } while (next_permutation(p + 1, p + 10));     ST.Init();     for (int i = 1, j; i <= n; i = j + 1) {       for (ST.Insert(ST.root, P[j = i].x); j < n && P[j].y == P[j + 1].y;            ST.Insert(ST.root, P[++j].x))         ;       for (int k = head[i]; ~k; k = edge[k].next) {         int p = edge[k].p, idx1 = edge[k].idx1, idx2 = edge[k].idx2;         int cnt = ST.Rank(ST.root, p);         if (idx2 == 1 && mes[idx1].t1 != cnt) mes[idx1].flag = 0;         if (idx2 == 2 && mes[idx1].t2 != cnt) mes[idx1].flag = 0;         if (idx2 == 3 && mes[idx1].t3 != cnt) mes[idx1].flag = 0;         if (idx2 == 4 && mes[idx1].t4 != cnt) mes[idx1].flag = 0;       }     }     for (int i = 1; i <= k; ++i)       if (mes[i].flag) {         printf( %.10lf %.10lf n%.10lf %.10lf n , double(mes[i].lx1) + 0.5,                double(mes[i].lx2) + 0.5, double(mes[i].ly1) + 0.5,                double(mes[i].ly2) + 0.5);         return 0;       }     puts( -1 );     return 0;   }