Problem: Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so that the points from the first set lay at the vertexes of some square and the points from the second set lay at the vertexes of a rectangle. Each point of initial 8 should belong to exactly one set. It is acceptable for a rectangle from the second set was also a square. If there are several partitions, Petya will be satisfied by any of them. Help him find such partition. Note that the rectangle and the square from the partition should have non-zero areas. The sides of the figures do not have to be parallel to the coordinate axes, though it might be the case.

Input

You are given 8 pairs of integers, a pair per line — the coordinates of the points Petya has. The absolute value of all coordinates does not exceed 104. It is guaranteed that no two points coincide.

Output

Print in the first output line "YES" (without the quotes), if the desired partition exists. In the second line output 4 space-separated numbers — point indexes from the input, which lie at the vertexes of the square. The points are numbered starting from 1. The numbers can be printed in any order. In the third line print the indexes of points lying at the vertexes of a rectangle in the similar format. All printed numbers should be pairwise distinct.

If the required partition does not exist, the first line should contain the word "NO" (without the quotes), after which no output is needed.

Examples

Input

0 0
10 11
10 0
0 11
1 1
2 2
2 1
1 2


Output

YES
5 6 7 8
1 2 3 4


Input

0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7


Output

NO


Input

0 0
4 4
4 0
0 4
1 2
2 3
3 2
2 1


Output

YES
1 2 3 4
5 6 7 8

Note

Pay attention to the third example: the figures do not necessarily have to be parallel to the coordinate axes.

Solution (in JAVA):

Solution:
/*
Keep solving problems.
*/

import java.util.*;
import java.io.*;

public class CFA {
    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    final long MOD = 1000L * 1000L * 1000L + 7;
    int[] dx = {0, -1, 0, 1};
    int[] dy = {1, 0, -1, 0};

    int[] x;
    int[] y;
    int n;
    void solve() throws IOException {
        n = 8;
        x = new int[n];
        y = new int[n];
        for (int i = 0; i < n; i++) {
            x[i] = nextInt();
            y[i] = nextInt();
        }

        for (int i = 0; i < (1 << n); i++) {
            if (Integer.bitCount(i) == 4) {
                List<Integer> l1 = new ArrayList<>();
                List<Integer> l2 = new ArrayList<>();
                for (int j = 0; j < n; j++) {
                    if ((i & (1 << j)) != 0) {
                        l1.add(j);
                    }
                    else {
                        l2.add(j);
                    }
                }

                boolean b1 = isSquare(l1);
                boolean b2 = isRect(l2);
                if (b1 && b2) {
                    outln("YES");
                    for (int j = 0; j < n / 2; j++) {
                        out((1 + l1.get(j)) + " ");
                    }
                    outln("");
                    for (int j = 0; j < n / 2; j++) {
                        out((1 + l2.get(j)) + " ");
                    }
                    return;
                }
            }
        }

        out("NO");
    }

    boolean isSquare(List<Integer> l1) {
        int sz = l1.size();
        List<Integer> dist = new ArrayList<>();
        for (int i = 0; i < sz; i++) {
            for (int j = i + 1; j < sz; j++) {
                int dx = Math.abs(x[l1.get(i)] - x[l1.get(j)]);
                int dy = Math.abs(y[l1.get(i)] - y[l1.get(j)]);
                dist.add(dx * dx + dy * dy);
            }
        }

        Collections.sort(dist);
        for (int i = 1; i < 4; i++) {
            if (!dist.get(i).equals(dist.get(0))) {
                return false;
            }
        }

        return dist.get(4).equals(dist.get(5)) && dist.get(4).equals(2 * dist.get(0));
    }

    class Edge implements Comparable<Edge> {
        int length;
        int u;
        int v;
        public Edge(int u, int v) {
            int dx = x[u] - x[v];
            int dy = y[u] - y[v];
            length = dx * dx + dy * dy;
            this.u = u;
            this.v = v;
        }

        @Override
        public int compareTo(Edge o) {
            return this.length - o.length;
        }
    }

    boolean isRect(List<Integer> l1) {
        int sz = l1.size();
        List<Edge> dist = new ArrayList<>();
        for (int i = 0; i < sz; i++) {
            for (int j = i + 1; j < sz; j++) {
                dist.add(new Edge(l1.get(i), l1.get(j)));
            }
        }

        Collections.sort(dist);
        if (dist.get(0).length != dist.get(1).length) {
            return false;
        }
        if (dist.get(2).length != dist.get(3).length) {
            return false;
        }
        if (dist.get(4).length != dist.get(5).length) {
            return false;
        }
        if (dist.get(4).length != dist.get(0).length + dist.get(2).length) {
            return false;
        }

        Set<Integer> points = new HashSet<>();
        points.add(dist.get(4).u);
        points.add(dist.get(4).v);
        points.add(dist.get(5).u);
        points.add(dist.get(5).v);

        return points.size() == 4;
    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }

    long gcd(long a, long b) {
        while(a != 0 && b != 0) {
            long c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }

    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    public CFA() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFA();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}