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:
import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.MalformedParameterizedTypeException;
import java.util.Arrays;
import java.util.StringTokenizer;

public class D {
    static BufferedReader reader;
    static StringTokenizer tokenizer;
    static PrintWriter writer;

    static void init() {
        reader = new BufferedReader(new InputStreamReader(System.in));

        writer = new PrintWriter(System.out);
    }

    static String nextToken() {
        while (tokenizer == null || !tokenizer.hasMoreTokens())
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                System.out.println(e);
                System.exit(1);
            }
        return tokenizer.nextToken();
    }

    static byte nextByte() {
        return Byte.parseByte(nextToken());
    }

    static int nextInt() {
        return Integer.parseInt(nextToken());
    }

    static double nextDouble() {
        return Double.parseDouble(nextToken());
    }

    static int squareLen(Point a, Point b) {
        return (b.x - a.x) * (b.x - a.x) + (b.y - a.y) * (b.y - a.y);
    }

    static boolean isDirectAngle(Point v, Point a, Point b) {
        Point vab = new Point(a.x - v.x, a.y - v.y), vac = new Point(b.x - v.x, b.y - v.y);
        return vab.x * vac.x + vab.y * vac.y == 0;
    }

    static boolean isRectangle(Point a, Point b, Point c, Point d) {
        return (isDirectAngle(a, b, d) && isDirectAngle(b, a, c) && isDirectAngle(c, b, d) && isDirectAngle(d, a, c)) ||
                (isDirectAngle(a, b, c) && isDirectAngle(b, a, d) && isDirectAngle(d, b, c) && isDirectAngle(c, a, d)) ||
                (isDirectAngle(b, c, d) && isDirectAngle(c, b, a) && isDirectAngle(a, c, d) && isDirectAngle(d, a, b));
    }

    static boolean isSquare(Point a, Point b, Point c, Point d) {
        if (!isRectangle(a, b, c, d)) return false;

        if (isDirectAngle(a, b, d)) {
            int len = squareLen(a, b);
            return len == squareLen(b, c) && len == squareLen(c, d) && len == squareLen(a, d);
        }
        if (isDirectAngle(a, b, c)) {
            int len = squareLen(a, b);
            return len == squareLen(b, d) && len == squareLen(c, d) && len == squareLen(a, c);
        }
        if (isDirectAngle(b, c, d)) {
            int len = squareLen(b, c);
            return len == squareLen(a, c) && len == squareLen(a, d) && len == squareLen(b, d);
        }

        return false;
    }

    static void solve() {
        Point[] points = new Point[8];
        for (int i = 0; i < points.length; i++)
            points[i] = new Point(nextInt(), nextInt());

        boolean mayBe = false;


        loop:
        for (int a = 0; a < points.length - 3; a++)
            for (int b = a + 1; b < points.length - 2; b++)
                for (int c = b + 1; c < points.length - 1; c++)
                    for (int d = c + 1; d < points.length; d++) {
                        if (isSquare(points[a], points[b], points[c], points[d])) {
                            int e = 0, f = 0, g = 0, h = 0;
                            while (e == a || e == b || e == c || e == d) e++;
                            while (f == a || f == b || f == c || f == d || f == e) f++;
                            while (g == a || g == b || g == c || g == d || g == e || g == f) g++;
                            while (h == a || h == b || h == c || h == d || h == e || h == f || h == g) h++;
                            if (isRectangle(points[e], points[f], points[g], points[h])) {
                                mayBe = true;
                                writer.println("YES");
                                writer.format("%d %d %d %d\n", a + 1, b + 1, c + 1, d + 1);
                                writer.format("%d %d %d %d\n", e + 1, f + 1, g + 1, h + 1);
                                break loop;
                            }
                        }
                    }

        if (!mayBe) writer.println("NO");
    }

    static void close() {
        try {
            reader.close();

            writer.flush();
            writer.close();
        } catch (IOException e) {
            System.out.println(e);
            System.exit(1);
        }
    }

    public static void main(String[] args) {
        init();
        solve();
        close();
    }
}