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.*;
import java.util.*;
import java.lang.*;

public class Rextester{
    static class Points{
        int x,y;
        public Points(int x,int y){
            this.x = x;
            this.y = y;
        }
        public double distance(Points o){
            return Math.sqrt(Math.pow(this.x - o.x,2)+Math.pow(this.y - o.y,2));
        }
    }
    static boolean isSquare(Points a,Points b,Points c,Points d){
        Points[] pts = new Points[4];
        pts[0]=new Points(a.x,a.y);
        pts[1]=new Points(b.x,b.y);
        pts[2]=new Points(c.x,c.y);
        pts[3]=new Points(d.x,d.y);
        double side = -1,diagonal = -1;
        int sideCount = 0,diagonalCount = 0;
        for(int i=0;i<4;i++){
            for(int j=0;j<4;j++){
                if(i==j){
                    continue;
                }
                double dist = pts[i].distance(pts[j]);
                if(side==-1){
                    side=dist;
                    sideCount++;
                }
                else if(dist==side){
                    sideCount++;
                }
                else if(diagonal==-1){
                    diagonal=dist;
                    diagonalCount++;
                }
                else if(diagonal==dist){
                    diagonalCount++;
                }
                else{
                    return false;
                }
            }
        }
        if(side<diagonal){
            if(sideCount == 8 && diagonalCount == 4){
                return true;
            }
        }
        else if(side>diagonal){
            if(sideCount == 4 && diagonalCount == 8){
                return true;
            }
        }
        return false;
    }
    
    static boolean isRectangle(Points a,Points b,Points c,Points d){
        Points[] pts = new Points[4];
        pts[0]=new Points(a.x,a.y);
        pts[1]=new Points(b.x,b.y);
        pts[2]=new Points(c.x,c.y);
        pts[3]=new Points(d.x,d.y);
        double side1 = -1,diagonal = -1,side2=-1;
        int side1Count = 0,diagonalCount = 0,side2Count=0;
        for(int i=0;i<4;i++){
            for(int j=0;j<4;j++){
                if(i==j){
                    continue;
                }
                double dist = pts[i].distance(pts[j]);
                if(side1==-1){
                    side1=dist;
                    side1Count++;
                }
                else if(dist==side1){
                    side1Count++;
                }
                else if(side2==-1){
                    side2=dist;
                    side2Count++;
                }
                else if(dist==side2){
                    side2Count++;
                }
                else if(diagonal==-1){
                    diagonal=dist;
                    diagonalCount++;
                }
                else if(diagonal==dist){
                    diagonalCount++;
                }
                else{
                    return false;
                }
            }
        }
        //System.out.println(side1+" "+side2+" "+diagonal);
        if(side1Count==4 && side2Count==4 && diagonalCount==4){
            double[] sides = new double[3];
            sides[0]=side1;
            sides[1]=side2;
            sides[2]=diagonal;
            Arrays.sort(sides);
            double q = Math.pow(sides[0],2)+Math.pow(sides[1],2);
            double r = Math.pow(sides[2],2);
            if(Math.abs(q-r)<1e-6){
                if(isOnLine(pts[0],pts[1],pts[2]) || isOnLine(pts[0],pts[2],pts[3]) || isOnLine(pts[1],pts[2],pts[3]) || isOnLine(pts[0],pts[1],pts[3])){
                    return false;
                }
                return true;
            }
        }
        return false;
    }
    
    static boolean isOnLine(Points a,Points b,Points c){
        if(a.x==b.x || b.x==c.x || a.x==c.x){
            if(a.x==b.x && b.x==c.x){
                return true;
            }
            return false;
        }
        double numerator = b.y*(a.x-c.x)+a.y*(c.x-b.x)+c.y*(b.x-a.x);
        double denominator = (b.x-a.x)*(a.x-c.x) + (b.y-a.y)*(a.y-c.y);
        double angleRad = Math.atan(numerator/denominator);
        double angleDeg = (angleRad*180)/Math.PI;
        if(angleDeg<0){
            angleDeg+=180;
        }
        if(Math.abs(angleDeg-180)<1e-6 || Math.abs(angleDeg)<1e-6){
            return true;
        }
        return false;
    }
            
    
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Points[] points = new Points[8];
        for(int i=0;i<8;i++){
            StringTokenizer st = new StringTokenizer(br.readLine());
            points[i]=new Points(Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));
        }
        br.close();
        for(int i=0;i<8;i++){
            for(int j=i+1;j<8;j++){
                for(int k=j+1;k<8;k++){
                    for(int l=k+1;l<8;l++){
                        if(isSquare(points[i],points[j],points[k],points[l])){
                            int[] rem= new int[4];
                            int p = 0;
                            for(int m=0;m<8;m++){
                                if(m!=i && m!=j && m!=k && m!=l){
                                    rem[p++]=m;
                                }
                            }
                            if(isRectangle(points[rem[0]],points[rem[1]],points[rem[2]],points[rem[3]])||isSquare(points[rem[0]],points[rem[1]]
                                        ,points[rem[2]],points[rem[3]])){
                                System.out.println("YES");
                                System.out.println((i+1)+" "+(j+1)+" "+(k+1)+" "+(l+1));
                                System.out.println((rem[0]+1)+" "+(rem[1]+1)+" "+(rem[2]+1)+" "+(rem[3]+1));
                                return;
                            }
                        }
                    }
                }
            }
        }
        //System.out.println(isRectangle(points[0],points[1],points[2],points[3]));
        System.out.println("NO");
    }
}