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.io.FileReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        //Scanner in = new Scanner(new FileReader("Input.txt"));
        PrintWriter out = new PrintWriter(System.out);
        int n = 8;
        Point[] points = new Point[8];
        for (int i = 0; i< n; ++i) {
            points[i] = new Point(i + 1, in.nextInt(), in.nextInt());
        }

        boolean possible = false;
        for (int mask = (1 << 7); mask < (1 << 8); ++mask) {
            if (Integer.bitCount(mask) == 4) {
                ArrayList<Point> firstSet = new ArrayList<Point>();
                ArrayList<Point> secondSet = new ArrayList<Point>();
                for (int i = 0; i < n; ++i) {
                    if ((mask & (1 << i)) == 0)
                        secondSet.add(points[i]);
                    else
                        firstSet.add(points[i]);
                }
                int first = 0, second = 0;
                
                for (int w = 0; w < 4; ++w) {
                    for (int x = 0; x < 4; ++x) {
                        if (x == w) continue;
                        for (int y = 0; y < 4; ++y) {
                            if (y == w || y == x) continue;
                            for (int z = 0; z < 4; ++z) {
                                if (z == w || z == y || z == x) continue;
                                Point midPointDiagonal1 = new Point(-1, firstSet.get(w).x + firstSet.get(y).x, firstSet.get(w).y + firstSet.get(y).y);
                                Point midPointDiagonal2 = new Point(-1, firstSet.get(x).x + firstSet.get(z).x, firstSet.get(x).y + firstSet.get(z).y);
                                if (midPointDiagonal1.x == midPointDiagonal2.x && midPointDiagonal1.y == midPointDiagonal2.y) {
                                    if (firstSet.get(w).distance(firstSet.get(y)) == firstSet.get(x).distance(firstSet.get(z)) && firstSet.get(w).distance(firstSet.get(y)) != 0) {
                                        first = 1;
                                        long distance1 = firstSet.get(w).distance(firstSet.get(x));
                                        long distance2 = firstSet.get(x).distance(firstSet.get(y));
                                        long distance3 = firstSet.get(y).distance(firstSet.get(z));
                                        long distance4 = firstSet.get(z).distance(firstSet.get(w));
                                        if (distance1 == distance2 && distance2 == distance3 && distance3 == distance4 && distance4 == distance1 && distance1 != 0) {
                                            first = 2;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                
                for (int w = 0; w < 4; ++w) {
                    for (int x = 0; x < 4; ++x) {
                        if (x == w) continue;
                        for (int y = 0; y < 4; ++y) {
                            if (y == w || y == x) continue;
                            for (int z = 0; z < 4; ++z) {
                                if (z == w || z == y || z == x) continue;
                                Point midPointDiagonal1 = new Point(-1, secondSet.get(w).x + secondSet.get(y).x, secondSet.get(w).y + secondSet.get(y).y);
                                Point midPointDiagonal2 = new Point(-1, secondSet.get(x).x + secondSet.get(z).x, secondSet.get(x).y + secondSet.get(z).y);
                                if (midPointDiagonal1.x == midPointDiagonal2.x && midPointDiagonal1.y == midPointDiagonal2.y) {
                                    if (secondSet.get(w).distance(secondSet.get(y)) == secondSet.get(x).distance(secondSet.get(z)) && secondSet.get(w).distance(secondSet.get(y)) != 0) {
                                        second = 1;
                                        long distance1 = secondSet.get(w).distance(secondSet.get(x));
                                        long distance2 = secondSet.get(x).distance(secondSet.get(y));
                                        long distance3 = secondSet.get(y).distance(secondSet.get(z));
                                        long distance4 = secondSet.get(z).distance(secondSet.get(w));
                                        if (distance1 == distance2 && distance2 == distance3 && distance3 == distance4 && distance4 == distance1 && distance1 != 0) {
                                            second = 2;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                if ((first == 1 && second == 2) || (first == 2 && second == 1) || (first == 2 && second == 2)) {
                    out.println("YES");
                    int square = (first == 2) ? 1 : 2;
                    int rectangle = (square == 1) ? 2 : 1;
                    if (square == 1) printPointList(firstSet, out);
                    else printPointList(secondSet, out);
                    if (rectangle == 1) printPointList(firstSet, out);
                    else printPointList(secondSet, out);
                    possible = true;
                    break;
                }
            }
        }
        if (!possible)
            out.println("NO");

        in.close();
        out.close();
    }

    public static void printPointList(ArrayList<Point> points, PrintWriter out) {
        for (int i = 0; i < points.size(); ++i) {
            out.print(points.get(i).id);
            if (i != points.size() - 1)
                out.print(" ");
        }
        out.println();
    }

    public static class Point {
        int id, x, y;

        public Point(int id, int x, int y) {
            this.id = id;
            this.x = x;
            this.y = y;
        }

        public long distance(Point another) {
            int dx = this.x - another.x;
            int dy = this.y - another.y;
            return (long) (dx * dx + dy * dy);
        }
    }
}