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.*;
import java.io.*;
public class C97D{
    static BufferedReader br;
    public static void main(String args[])throws Exception{
        br=new BufferedReader(new InputStreamReader(System.in));
        Point p[]=new Point[8];
        for(int i=0;i<8;i++){

            int nm[]=toIntArray();
            p[i]=new Point(nm[0],nm[1]);
        }
        boolean used[]=new boolean[8];
        for(int p1=0;p1<8;p1++)
            for(int p2=0;p2<8;p2++)
                if(p1!=p2)
                for(int p3=0;p3<8;p3++)
                    if(p2!=p3 && p1!=p3)
                    for(int p4=0;p4<8;p4++)
                        if(p1!=p4 && p2!=p4 && p3!=p4){
                            Arrays.fill(used, false);
                            int a=isRect(p[p1],p[p2],p[p3],p[p4]);
                            used[p1]=true;
                            used[p2]=true;
                            used[p3]=true;
                            used[p4]=true;
                            
                            if(a==2){
                                Point t[]=new Point[4];
                                int c=0;
                                for(int i=0;i<8;i++){
                                    if(!used[i])
                                        t[c++]=p[i];
                                }
                                int b=isRect(t);
                                if(b>0){
                                    prln("YES");
                                    prln((p1+1)+" "+(p2+1)+" "+(p3+1)+" "+(p4+1));
                                    for(int i=0;i<8;i++){
                                        if(!used[i])
                                            pr((i+1)+" ");
                                    }
                                    prln("");
                                    return;
                                }
                            }

                        }

                        prln("NO");


    }
    public static int isRect(Point p1,Point p2,Point p3,Point p4){
       int ret=0;
       int x1=p1.x;
       int x2=p2.x;
       int x3=p3.x;
       int x4=p4.x;
       int y1=p1.y;
       int y2=p2.y;
       int y3=p3.y;
       int y4=p4.y;


       x2 -= x1; x3 -= x1; x4 -= x1; y2 -= y1; y3 -= y1; y4 -= y1;
      if((x2 + x3 == x4 && y2 + y3 == y4 && x2 * x3 == -y2 * y3) ||
        (x2 + x4 == x3 && y2 + y4 == y3 && x2 * x4 == -y2 * y4) ||
        (x3 + x4 == x2 && y3 + y4 == y2 && x3 * x4 == -y3 * y4)){
          if(sqr(p1,p2,p3)){
              ret=2;
          }
          else ret=1;
      }
       return ret;
    }
    public static int isRect(Point p[]){
       int ret=0;
       int x1=p[0].x;
       int x2=p[1].x;
       int x3=p[2].x;
       int x4=p[3].x;
       int y1=p[0].y;
       int y2=p[1].y;
       int y3=p[2].y;
       int y4=p[3].y;


       x2 -= x1; x3 -= x1; x4 -= x1; y2 -= y1; y3 -= y1; y4 -= y1;
      if((x2 + x3 == x4 && y2 + y3 == y4 && x2 * x3 == -y2 * y3) ||
        (x2 + x4 == x3 && y2 + y4 == y3 && x2 * x4 == -y2 * y4) ||
        (x3 + x4 == x2 && y3 + y4 == y2 && x3 * x4 == -y3 * y4)){
          if(sqr(p[0],p[1],p[2])){
              ret=2;
          }
          else ret=1;
      }
       return ret;
    }
    public static boolean sqr(Point p1, Point p2, Point p3){
        double a=Math.sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y));
        double b=Math.sqrt((p2.x-p3.x)*(p2.x-p3.x)+(p2.y-p3.y)*(p2.y-p3.y));
        double c=Math.sqrt((p1.x-p3.x)*(p1.x-p3.x)+(p1.y-p3.y)*(p1.y-p3.y));
        return (a==b && a<c)|| (b==c && b<c) || (a==c && a<b);


    }
    /****************************************************************/
    public static int[] toIntArray()throws Exception{
       String str[]=br.readLine().split(" ");
       int k[]=new int[str.length];
       for(int i=0;i<str.length;i++){
            k[i]=Integer.parseInt(str[i]);
       }
       return k;
    }
    public static int toInt()throws Exception{
       return Integer.parseInt(br.readLine());
    }
    public static long[] toLongArray()throws Exception{
       String str[]=br.readLine().split(" ");
       long k[]=new long[str.length];
       for(int i=0;i<str.length;i++){
            k[i]=Long.parseLong(str[i]);
       }
       return k;
    }
    public static long toLong()throws Exception{
       return Long.parseLong(br.readLine());
    }
    public static double[] toDoubleArray()throws Exception{
       String str[]=br.readLine().split(" ");
       double k[]=new double[str.length];
       for(int i=0;i<str.length;i++){
            k[i]=Double.parseDouble(str[i]);
       }
       return k;
    }
    public static double toDouble()throws Exception{
       return Double.parseDouble(br.readLine());
    }
    public static String toStr()throws Exception{
       return br.readLine();
    }
    public static String[] toStrArray()throws Exception{
       String str[]=br.readLine().split(" ");
       return str;
    }
    public static void pr(Object st){
	System.out.print(st);
    }
    public static void prln(Object st){
	System.out.println(st);
    }
    /****************************************************************/

}
class Point{
    int x;
    int y;
    public Point(int xx, int yy){
        x=xx;
        y=yy;
    }

}