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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;


public class ProblemD implements Runnable{
    
    long[] x=new long[8];
    long[] y=new long[8];

    public void solve() throws IOException{
        for(int i=0;i<8;i++){
            int[] inp=intArr();
            x[i]=(long)inp[0];
            y[i]=(long)inp[1];
        }
        
        int[] ind=new int[4];
        int[] ind2=new int[4];
        
        for(ind[0]=0;ind[0]<8;ind[0]++){
            for(ind[1]=ind[0]+1;ind[1]<8;ind[1]++){
                for(ind[2]=ind[1]+1;ind[2]<8;ind[2]++){
                    for(ind[3]=ind[2]+1;ind[3]<8;ind[3]++){
                        int ii=0;
                        for(int i=0;i<8;i++){
                            boolean found=true;
                            for(int j=0;j<4;j++){
                                if(ind[j]==i){
                                    found=false;
                                    break;
                                }
                            }
                            if(found){
                                ind2[ii]=i;
                                ii++;
                            }
                        }
                        
                        int k1=kindOfFigure(ind);
                        int k2=kindOfFigure(ind2);
                        
                        if(k1==2 && k2>0){
                            out.println("YES");
                            for(int i=0;i<4;i++){
                                if(i>0){
                                    out.print(" ");
                                }
                                out.print(ind[i]+1);
                            }
                            out.println();
                            for(int i=0;i<4;i++){
                                if(i>0){
                                    out.print(" ");
                                }
                                out.print(ind2[i]+1);
                            }
                            out.println();
                            return;
                        }
                    }    
                }    
            }    
        }
        
        out.println("NO");
    }
    
    private int kindOfFigure(int[] ind){
        int[] ii=new int[4];
        boolean[] used=new boolean[4];
        
        ii[0]=0; used[0]=true;
        
        long[] l2=new long[4];
        for(int i=1;i<4;i++){
            l2[i]=dist2(ind[0],ind[i]);
        }
        ii[1]=indMin(l2, used);
        used[ii[1]]=true;
        ii[3]=indMin(l2, used);
        used[ii[3]]=true;
        ii[2]=indMin(l2, used);
        used[ii[2]]=true;
        
        long a1=dist2(ind[ii[0]], ind[ii[1]]);
        long a2=dist2(ind[ii[2]], ind[ii[3]]);
        
        long b1=dist2(ind[ii[0]], ind[ii[3]]);
        long b2=dist2(ind[ii[1]], ind[ii[2]]);
        
        long c1=dist2(ind[ii[0]], ind[ii[2]]);
        long c2=dist2(ind[ii[1]], ind[ii[3]]);
        
        int kind=0;
        if(a1==a2 && b1==b2 && c1==c2){
            kind=1;
        }
        if(kind==1 && a1==b1){
            kind=2;
        }
        return kind;
    }
    
    private long dist2(int ind1, int ind2){
        long dx=x[ind1]-x[ind2];
        long dy=y[ind1]-y[ind2];
        return dx*dx+dy*dy;
    }
    
    private int indMin(long[] val, boolean[] used){
        long min=Long.MAX_VALUE;
        int ind=-1;
        for(int i=0;i<val.length;i++){
            if(val[i]<min && !used[i]){
                min=val[i];
                ind=i;
            }
        }
        return ind;
    }

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

    @Override
    public void run(){
//      System.out.println("trying to solve");
        try{
            in=new BufferedReader(new InputStreamReader(stdin));
            out=new PrintWriter(stdout);
            solve();
            in.close();
            out.close();
        } catch (Exception ex){
            ex.printStackTrace();
            System.exit(1);
        }
    }

    BufferedReader in;
    PrintWriter out;

    int[] intArr() throws IOException {
        String[] arr=nextLine().split("\\s");
        int[] res=new int[arr.length];
        for(int i=0;i<arr.length;i++) res[i]=Integer.parseInt(arr[i]);
        return res;
    }

    long[] longArr() throws IOException {
        String[] arr=nextLine().split("\\s");
        long[] res=new long[arr.length];
        for(int i=0;i<arr.length;i++) res[i]=Long.parseLong(arr[i]);
        return res;
    }

    double[] doubleArr() throws IOException {
        String[] arr=nextLine().split("\\s");
        double[] res=new double[arr.length];
        for(int i=0;i<arr.length;i++) res[i]=Double.parseDouble(arr[i]);
        return res;
    }

    String nextLine() throws IOException {
        return in.readLine();
    }

    InputStream stdin;
    OutputStream stdout;
    public ProblemD(){
        stdin=System.in;
        stdout=System.out;
    }

    public ProblemD(InputStream stdin, OutputStream stdout){
        this.stdin=stdin;
        this.stdout=stdout;
    }
}