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

public class four {
    static int[] s;
    static int[] r;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        point[] points = new point[8];
        HashMap<String, Integer> map = new HashMap<String, Integer>();
        for (int i = 0; i < 8; i++) {
            int x = sc.nextInt();
            int y = sc.nextInt();
            points[i] = new point(x, y);
            map.put(x + "" + y, i);
        }
        boolean found = true;
        boolean[] v = new boolean[8];

        Arrays.sort(points);

        for (int i = 0; i < 8 && found; i++)
            for (int j = i + 1; j < 8 && found; j++)
                for (int k = j + 1; k < 8 && found; k++)
                    for (int l = k + 1; l < 8 && found; l++) {
                        Arrays.fill(v, true);
                        v[i] = false;
                        v[j] = false;
                        v[k] = false;
                        v[l] = false;
                        boolean check = check(v, points);
                        if (check) {
                            found = false;

                        }

                    }
        String ans = "";
        if (!found) {
            ans += "YES\n";

            int[] a1 = { map.get((points[s[0]].i + "" + points[s[0]].j)),
                    map.get((points[s[1]].i + "" + points[s[1]].j)),
                    map.get((points[s[2]].i + "" + points[s[2]].j)),
                    map.get((points[s[3]].i + "" + points[s[3]].j)) };
            Arrays.sort(a1);
            ans += (a1[0] + 1) + " " + (a1[1] + 1) + " " + (a1[2] + 1) + " "
                    + (a1[3] + 1) + "\n";
            int[] a2 = { map.get((points[r[0]].i + "" + points[r[0]].j)),
                    map.get((points[r[1]].i + "" + points[r[1]].j)),
                    map.get((points[r[2]].i + "" + points[r[2]].j)),
                    map.get((points[r[3]].i + "" + points[r[3]].j)) };
            Arrays.sort(a2);
            ans += (a2[0] + 1) + " " + (a2[1] + 1) + " " + (a2[2] + 1) + " "
                    + (a2[3] + 1) + "\n";

        } else {
            ans += "NO\n";
        }
        System.out.print(ans);

    }

    private static boolean check(boolean[] v, point[] points) {
        int[] square = new int[4];
        int[] rect = new int[4];
        int in1 = 0;
        int in2 = 0;
        for (int i = 0; i < 8; i++)
            if (v[i])
                square[in1++] = i;
            else
                rect[in2++] = i;

        boolean check1 = checksquare(square, points);
        boolean check2 = checkRect(rect, points);
        if (check1 && check2) {
            s = square;
            r = rect;
            return true;
        } else {
            check1 = checksquare(rect, points);
            check2 = checkRect(square, points);
            if (check1 && check2) {
                s = rect;
                r = square;
                return true;
            }
        }

        return false;
    }

    private static boolean checksquare(int[] rect, point[] points) {
        long d1 = calcul(points, rect[0], rect[1]);
        long d2 = calcul(points, rect[0], rect[2]);
        long d3 = calcul(points, rect[1], rect[2]);
        long d4 = calcul(points, rect[1], rect[3]);
        long d5 = calcul(points, rect[2], rect[3]);
        long d6 = calcul(points, rect[0], rect[3]);
        if (d1 == d2 && d1 == d4 && d1 == d5 && d3 == d6 && d1 + d2 == d3)
        {
                return true;
        }
        else
            return false;

    }

    private static boolean checkRect(int[] square, point[] points) {
        long d1 = calcul(points, square[0], square[1]);
        long d2 = calcul(points, square[0], square[2]);
        long d3 = calcul(points, square[1], square[2]);
        long d4 = calcul(points, square[1], square[3]);
        long d5 = calcul(points, square[2], square[3]);
        long d6 = calcul(points, square[0], square[3]);
        if (d1 == d5 && d2 == d4 && d3 == d6 && d1 + d2 == d3)
        {
            
            return true;
        }else
            return false;
    }

    private static long calcul(point[] points, int i, int j) {

        long d = (points[i].i - points[j].i) * (points[i].i - points[j].i)
                + (points[i].j - points[j].j) * (points[i].j - points[j].j);

        return d;

    }

    static class point implements Comparable<point> {

        int i;
        int j;

        public point(int ii, int jj) {
            i = ii;
            j = jj;
        }

        public int compareTo(point arg0) {
            // TODO Auto-generated method stub
            if (j < arg0.j)
                return 1;
            else if (j > arg0.j)
                return -1;
            else if (i < arg0.i)
                return 1;
            else
                return -1;
        }

        public String toString()
        {
            return "("+j+" "+i+")";
        }
    }

}