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.Scanner;

public class Rectangle_and_Square {
    static final double E = 0.00000005;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        point []arr = new point[9];
        for(int i = 1;i<9;i++)
        {
            arr[i] = new point(sc.nextInt() , sc.nextInt(),i);
        }
        point tmp;
        for(int i = 1;i<8;i++)
        {
            swap(arr , i ,8);
            for(int j = 1;j<8;j++)
            {
                swap(arr , j ,7);
                for(int k = 1;k<8;k++)
                {
                    swap(arr , j ,6);
                    for(int l = 1;l<8;l++)
                    {
                        swap(arr , l ,5);
                       // System.out.println(i+ ""+j+""+k+""+l);

                        if(isRectangle(arr[4],arr[1],arr[2],arr[3]) && isSquare(arr[4],arr[1],arr[2],arr[3]) && isRectangle(arr[5],arr[6],arr[7],arr[8]))
                        {
                            System.out.println("YES");
                            System.out.printf("%d %d %d %d\n",arr[1].index,arr[2].index,arr[3].index,arr[4].index);
                            System.out.printf("%d %d %d %d",arr[5].index,arr[6].index,arr[7].index,arr[8].index);
                            return;
                        }
                    }

                }

            }
        }
        System.out.println("NO");

    }
    public static boolean isRectangle(point p1 ,point p2,point p3,point p4 )
    {
        point points[] = {p1,p2,p3,p4};
        for(int i = 0 ;i<4;i++)
        {
            for(int j = i+1;j<4;j++)
            {
                for(int k = j+1;k<4;k++)
                {
                    if(!isRightAngled(points[i],points[j],points[k]))
                    {
                        return false;
                    }
                }
            }
        }
        return true;
    }

    public static boolean isSquare (point p1 ,point p2,point p3,point p4)
    {

        double l1 = Math.sqrt((p1.x - p2.x)*(p1.x - p2.x)+(p1.y - p2.y)*(p1.y - p2.y));
        double l2 = Math.sqrt((p1.x - p3.x)*(p1.x - p3.x)+(p1.y - p3.y)*(p1.y - p3.y));
        double l3 = Math.sqrt((p1.x - p4.x)*(p1.x - p4.x)+(p1.y - p4.y)*(p1.y - p4.y));

        double Min = Math.min(l1,l2);
        double Max = Math.max(l1,Math.max(l2,l3));
        return Math.abs(Math.sqrt(2)*Min  - Max) <E;
    }

    static  class point
    {
        int x;
        int y;
        int index;
        point(int x , int y, int index)
        {
            this.x = x;
            this.y = y;
            this.index = index;
        }
    }
    public static boolean isRightAngled(point p1 ,point p2 ,point p3 ) {
        if((p1.x == p2.x && p1.y == p2.y)||(p3.x == p2.x && p3.y == p2.y)||(p1.x == p3.x && p1.y == p3.y))
            return false;

        double l1 = Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2);
        double l2 = Math.pow(p2.x - p3.x, 2) + Math.pow(p2.y - p3.y, 2);
        double l3 = Math.pow(p1.x - p3.x, 2) + Math.pow(p1.y - p3.y, 2);
        double Max = Math.max(l1, Math.max(l2, l3));
        if ((Math.abs(Max - (l1 + l2 + l3 - Max)) <         E))
            return true;
        return false;
    }
    public static void swap(point[] arr , int  i , int j)
    {
        int tmpX = arr[j].x;
        int tmpY = arr[j].y;
        int tmpI = arr[j].index;
        arr[j].x = arr[i].x;
        arr[j].y = arr[i].y;
        arr[j].index = arr[i].index;
        arr[i].x = tmpX;
        arr[i].y = tmpY;
        arr[i].index = tmpI;
    }


}