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.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class D {

    class Point {

        int idx;
        long x, y;

        Point(int idx, long x, long y) {
            this.idx = idx;
            this.x = x;
            this.y = y;
        }
    }

    int ccw(Point A, Point B, Point C) {
        long dx1 = B.x - A.x, dy1 = B.y - A.y;
        long dx2 = C.x - A.x, dy2 = C.y - A.y;
        return Long.signum(dx1 * dy2 - dx2 * dy1);
    }

    Point[] sort(Point[] a) {
        int imin = 0;
        for (int i = 0; i < 4; ++i) {
            if (a[i].y < a[imin].y || (a[i].y == a[imin].y && a[i].x < a[imin].x)) {
                imin = i;
            }
        }        
        final Point O = new Point(a[imin].idx, a[imin].x, a[imin].y);
        Arrays.sort(a, new Comparator<Point>() {

            @Override
            public int compare(Point A, Point B) {
                int c = ccw(O, A, B);
                if (c != 0) {
                    return -c;
                }
                return Long.signum(sqr(A.x - O.x) + sqr(A.y - O.y) - sqr(B.x - O.x) - sqr(B.y - O.y));
            }
        });
        return a;
    }

    boolean isPerpendicular(Point A, Point B, Point C) {
        long x1 = A.x - B.x, y1 = A.y - B.y;
        long x2 = C.x - B.x, y2 = C.y - B.y;
        return x1 * x2 + y1 * y2 == 0;
    }

    long sqr(long x) {
        return x * x;
    }

    boolean isRectangle(Point[] a) {
        a = sort(a);              
        for (int i = 0; i < 4; ++i) {
            if (!isPerpendicular(a[i], a[(i + 1) % 4], a[(i + 2) % 4])) {
                return false;
            }
        }
        return true;
    }

    boolean isSquare(Point[] a) {
        a = sort(a);

        if (!isRectangle(a)) {
            return false;
        }

        long side = sqr(a[0].x - a[1].x) + sqr(a[0].y - a[1].y);
        for (int i = 0; i < 4; ++i) {
            long now = sqr(a[i].x - a[(i + 1) % 4].x) + sqr(a[i].y - a[(i + 1) % 4].y);
            if (now != side) {
                return false;
            }
        }

        return true;
    }

    public void run() {
//        Point[] X = new Point[]{
//            new Point(0, 0, 0),
//            new Point(0, 1, -3),
//            new Point(0, -1, -1),
//            new Point(0, 2, -2)
//        };
//        
//        System.out.println(isRectangle(X));


        Scanner scanner = new Scanner(System.in);

        Point[] a = new Point[8];
        long x, y;
        for (int i = 0; i < 8; ++i) {
            x = scanner.nextLong();
            y = scanner.nextLong();
            a[i] = new Point(i + 1, x, y);
        }

        boolean found = false;
        for (int state = 0; state < (1 << 8); ++state) {
            if (Integer.bitCount(state) == 4) {
                Point[] square = new Point[4];
                Point[] rectangle = new Point[4];

                int ns = 0, nr = 0;
                for (int i = 0; i < 8; ++i) {
                    if (((state >> i) & 1) == 1) {
                        square[ns++] = new Point(a[i].idx, a[i].x, a[i].y);
                    } else {
                        rectangle[nr++] = new Point(a[i].idx, a[i].x, a[i].y);
                    }
                }

                if (isSquare(square) && isRectangle(rectangle)) {
                    found = true;
                    System.out.println("YES");
                    for (int i = 0; i < 4; ++i) {
                        System.out.print(square[i].idx + " ");
                    }
                    System.out.println();
                    for (int i = 0; i < 4; ++i) {
                        System.out.print(rectangle[i].idx + " ");
                    }
                    System.out.println();
                    break;
                }
            }
        }
        if (!found) {
            System.out.println("NO");
        }

        scanner.close();
    }

    public static void main(String[] args) {
        new D().run();
    }
}