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 Main {
    public static void main(String[] args) {
        Scanner r = new Scanner(System.in);
        
        Point[] a = new Point[8];
        for(int i = 0; i < 8; i++){
            int x = r.nextInt();
            int y = r.nextInt();
            a[i] = new Point(x, y, i);
        }
        
        for(int m = 0; m < 1 << 8; m++){
            if(Integer.bitCount(m) != 4)continue;
            
            int p1 = 0, p2 = 0;
            Point[] s1 = new Point[4], s2 = new Point[4];
            for(int i = 0; i < 8; i++)
                if((m & (1 << i)) != 0){
                    s1[p1++] = a[i];
                }else{
                    s2[p2++] = a[i];
                }
            
            if(canSquare(0, new Point[4], s1, new boolean[4]) && canRect(0, new Point[4], s2, new boolean[4])){
                System.out.println("YES");
                for(int i = 0; i < 4; i++)
                    if(i == 0)System.out.print(s1[i].i + 1);
                    else System.out.print(" " + (s1[i].i + 1));
                System.out.println();
                for(int i = 0; i < 4; i++)
                    if(i == 0)System.out.print(s2[i].i + 1);
                    else System.out.print(" " + (s2[i].i + 1));
                System.out.println();
                
                return;
            }
        }
        
        System.out.println("NO");
    }

    private static double dist(Point a, Point b){
        return Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
    }

    static double eps = 1e-9;
    private static boolean equal(double len, double dist) {
        if(Math.abs(len - dist) < eps)return true;
        else return false;
    }
    
    private static Vector sub(Point b, Point a){
        return new Vector(b.x - a.x, b.y - a.y);
    }
    private static double dot(Vector a, Vector b){
        return 1.0 * a.x * b.x + 1.0 * a.y * b.y;
    }
    private static boolean canRect(int i, Point[] p, Point[] a, boolean[] v) {
        if(i == 4){
            
            double w = dist(p[0], p[1]);
            double h = dist(p[1], p[2]);
            
            if(equal(w * h, 0))return false;
            
            
            for(int k = 0; k < 4; k++){
                Vector v1 = sub(p[(k+1)%4], p[k]);
                Vector v2 = sub(p[(k+2)%4], p[(k+1)%4]);
                
//              if(p[0].i == 4 && p[1].i == 5 && p[2].i == 6 && p[3].i == 7){
//                  System.out.println(v1 + ", " + v2);
//                  System.out.println(dot(v1, v2));
//              }
                if(!equal(dot(v1, v2), 0))return false;
            }
            
            
//          for(int i = 0; i )
//          System.out.println(w * h);
            return true;
        }else{
            boolean can = false;
            for(int j = 0; j < 4; j++)if(!v[j]){
                v[j] = true;
                p[i] = a[j];
                can |= canRect(i+1, p, a, v);
                v[j] = false;
            }
            return can;
        }
    }


    private static boolean canSquare(int i, Point[] p, Point[] a, boolean[] v) {
//      System.out.println("here");
        if(i == 4){
            double w = dist(p[0], p[1]);
            double h = dist(p[1], p[2]);
            
            if(equal(w * h, 0))return false;
            
            //square
            double len = dist(p[0], p[1]);
            for(int k = 1; k < 4; k++){
//              System.out.println(len);
                if(!equal(len, dist(p[k], p[(k+1)%4])))return false;
            }
            
            for(int k = 0; k < 4; k++){
                Vector v1 = sub(p[(k+1)%4], p[k]);
                Vector v2 = sub(p[(k+2)%4], p[(k+1)%4]);
                
                if(!equal(dot(v1, v2), 0))return false;
            }
            
            return true;
        }else{
            boolean can = false;
            for(int j = 0; j < 4; j++)if(!v[j]){
                v[j] = true;
                p[i] = a[j];
                can |= canSquare(i+1, p, a, v);
                v[j] = false;
            }
            return can;
        }
    }
}
class Point{
    int x, y, i;
    public Point(int xi, int yi, int ii){
        x = xi;
        y = yi;
        i = ii;
    }
}
class Vector{
    int x, y;
    public Vector(int xi, int yi){
        x = xi;
        y = yi;
    }
    public String toString(){
        return String.format("(%d, %d)", x, y);
    }
}