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 B {

    double EPS = 1e-10;
    
    boolean eq(double r, double d){
        return Math.abs(d-r)<EPS;
    }
    int[][] p;
    double dist(int a, int b){
        return Math.hypot(p[a][0]-p[b][0], p[a][1]-p[b][1]);
    }
    
    int[] s1, s2;
    boolean[] u1, u2;
    boolean dfs1(int k){
        if(k==4){
            return dfs2(0);
        }
        for(int i=0;i<8;i++){
            if(!u1[i])continue;
            u1[i] = false;
            s1[k] = i;
            if(dfs1(k+1))return true;
            u1[i]=true;
        }
        return false;
    }
    boolean dfs2(int k){
        if(k==4){
            return check();
        }
        for(int i=0;i<8;i++){
            if(!u2[i])continue;
            u2[i] = false;
            s2[k] = i;
            if(dfs2(k+1))return true;
            u2[i]=true;
        }
        return false;
    }
    int[] sub(int[] a, int[] b){
        return new int[]{a[0]-b[0], a[1]-b[1]};
    }
    boolean check(){
        double d1 = dist(s1[0], s1[1]), d2 = dist(s2[0], s2[1]);
        boolean f1 = true, f2 = true;
//      System.out.println("set1: "+s1[0]+" "+s1[1]+" "+s1[2]+" "+s1[3]+ " set2:"+s2[0]+" "+s2[1]+" "+s2[2]+" "+s2[3]);
//      System.out.println(d1+" "+d2);
        for(int i=1;i<4;i++){
//          System.out.println(dist(s1[i], s1[i-1]));
            if(!eq(dist(s1[i], s1[i-1]), d1))f1 = false;
        }
//      System.out.println(f1);
        for(int i=0;i<4;i++){
            int[] s = sub(p[s1[(i+3)%4]], p[s1[(i+2)%4]]), t = sub(p[s1[i]], p[s1[(i+3)%4]]);
            double thita = Math.acos((s[0]*t[0]+s[1]*t[1])/Math.hypot(s[0], s[1])/Math.hypot(t[0], t[1]));
            if(!(Math.abs(thita-Math.PI/2)<EPS))f1 = false;
        }
//      System.out.println(f1);
//      for(int i=1;i<4;i++){
//          if(!eq(dist(s2[i], s2[i-1]), d2))f2 = false;
//      }
//      System.out.println(f2);
        for(int i=0;i<4;i++){
            int[] s = sub(p[s2[(i+3)%4]], p[s2[(i+2)%4]]), t = sub(p[s2[i]], p[s2[(i+3)%4]]);
            double thita =  Math.acos((s[0]*t[0]+s[1]*t[1])/Math.hypot(s[0], s[1])/Math.hypot(t[0], t[1]));
            if(!(Math.abs(thita-Math.PI/2)<EPS))f2 = false;
        }
//      System.out.println(f2);
        if(f1&&f2){
//          System.out.println("D1:"+d1+ " D2:"+d2);
            System.out.println("YES");
//          for(int i=0;i<4;i++){
//              int[] s = sub(p[s1[(i+3)%4]], p[s1[(i+2)%4]]), t = sub(p[s1[i]], p[s1[(i+3)%4]]);
//              double thita = Math.acos((s[0]*t[0]+s[1]*t[1])/Math.hypot(s[0], s[1])/Math.hypot(t[0], t[1]));
//              System.out.println(thita);
//          }
            System.out.println(++s1[0]+" "+ ++s1[1]+" "+ ++s1[2]+" "+ ++s1[3]);
            System.out.println(++s2[0]+" "+ ++s2[1]+" "+ ++s2[2]+" "+ ++s2[3]);
            return true;
        }
        return false;
    }
    
    void run(){
        Scanner sc = new Scanner(System.in);
        p = new int[8][2];
        for(int i=0;i<8;i++)for(int j=0;j<2;j++)p[i][j]=sc.nextInt();
        s1 = new int[4]; s2 = new int[4];
        boolean f = false;
//      s1[0]=0;s1[1]=3;s1[2]=1;s1[3]=2;
//      s2[0]=4;s2[1]=7;s2[2]=5;s2[3]=6;
//      check();
        for(int S=0;S<1<<8;S++){
            int c = 0;
            for(int j=0;j<8;j++)if(((S>>j)&1)>0)c++;
            if(c!=4)continue;
            u1 = new boolean[8]; u2 = new boolean[8];
            for(int j=0;j<8;j++){
                if(((S>>j)&1)>0)u1[j]=true;
                else u2[j]=true;
            }
            if(dfs1(0)){
                f = true; break;
            }
        }
        if(!f)System.out.println("NO");
    }
    
    public static void main(String[] args) {
        new B().run();
    }
}