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:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Saransh
 */
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

public class Main {

    /**
     * @param args the command line arguments
     */
    static int arr[][] = new int[8][2];

    public static void main(String[] args) {
        // TODO code application logic here
        try {
            Parserdoubt pd = new Parserdoubt(System.in);
            PrintWriter pw = new PrintWriter(System.out);
            for (int i = 0; i < arr.length; i++) {
                arr[i][0] = pd.nextInt();
                arr[i][1] = pd.nextInt();
            }
            for (int i = 0; i < (1 << 8); i++)
            {
                //System.out.println(i);
                if (Integer.bitCount(i) == 4)
                {
                    boolean k = check(i);
                    if(k)
                    {
                        System.out.println("YES");
                        int tmpi=i;
                        for(int j=1;j<=8;j++)
                        {
                            if(i%2==1)
                                System.out.print(j+" ");
                            i/=2;
                        }
                        System.out.println();
                        for(int j=1;j<=8;j++)
                        {
                            if(tmpi%2==0)
                                System.out.print(j+" ");
                            tmpi/=2;
                        }
                        return;
                    }
                }
            }
            System.out.println("NO");
        } catch (Exception e) 
        {
            e.printStackTrace();
        }

    }
    static int arr2[][];
    public static boolean check(int a)
    {
        int arr1[][]=new int[4][2];
        arr2=new int[4][2];
        int c1=0;
        int c2=0;
        for(int i=0;i<8;i++)
        {
            if(a%2==0)
            {
                arr1[c1][0]=arr[i][0];
                arr1[c1][1]=arr[i][1];
                c1++;
            }
            else
            {
                arr2[c2][0]=arr[i][0];
                arr2[c2][1]=arr[i][1];
                c2++;

            }a/=2;
        }
        if(isRectangle(arr1[0][0],arr1[0][1],arr1[1][0],arr1[1][1],arr1[2][0],arr1[2][1],arr1[3][0],arr1[3][1]))
        {
            if(isRectangle(arr2[0][0],arr2[0][1],arr2[1][0],arr2[1][1],arr2[2][0],arr2[2][1],arr2[3][0],arr2[3][1]))
            {
                if(check(0,2,3,1)||check(0,1,2,3)||check(0,1,3,2))
                {
                    return true;
                }
            }
        }
        return false;
    }
    public static boolean check(int a,int b,int c,int d)
    {
        if(eq(a,b,a,c)&&eq(a,b,c,d))
            return true;
        return false;
    }
    public static boolean eq(int a,int b,int c,int d)
    {
        if(Math.abs(dist(a,b)-dist(c,d))<1e-8)
            return true;
        return false;
    }
    public static double dist(int a,int b)
    {
        double x=arr2[a][0]-arr2[b][0];
        double y=arr2[a][1]-arr2[b][1];
        return Math.sqrt(x*x+y*y);
    }
    public static boolean isRectangle(double x1, double y1,
            double x2, double y2,
            double x3, double y3,
            double x4, double y4)
    {
        double cx, cy;
        double dd1, dd2, dd3, dd4;

        cx = (x1 + x2 + x3 + x4) / 4;
        cy = (y1 + y2 + y3 + y4) / 4;

        dd1 = sqr(cx - x1) + sqr(cy - y1);
        dd2 = sqr(cx - x2) + sqr(cy - y2);
        dd3 = sqr(cx - x3) + sqr(cy - y3);
        dd4 = sqr(cx - x4) + sqr(cy - y4);
        return dd1 == dd2 && dd1 == dd3 && dd1 == dd4;
    }
    public static double sqr(double a)
    {
        return a*a;
    }
}

class Parserdoubt {

    final private int BUFFER_SIZE = 1 << 17;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Parserdoubt(InputStream in) {
        din = new DataInputStream(in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String nextString() throws Exception {
        StringBuffer sb = new StringBuffer("");
        byte c = read();
        while (c <= ' ') {
            c = read();
        }
        do {
            sb.append((char) c);
            c = read();
        } while (c > ' ');
        return sb.toString();
    }

    public char nextChar() throws Exception {
        byte c = read();
        while (c <= ' ') {
            c = read();
        }
        return (char) c;
    }

    public int nextInt() throws Exception {
        int ret = 0;
        byte c = read();
        while (c <= ' ') {
            c = read();
        }
        boolean neg = c == '-';
        if (neg) {
            c = read();
        }
        do {
            ret = ret * 10 + c - '0';
            c = read();
        } while (c > ' ');
        if (neg) {
            return -ret;
        }
        return ret;
    }

    public long nextLong() throws Exception {
        long ret = 0;
        byte c = read();
        while (c <= ' ') {
            c = read();
        }
        boolean neg = c == '-';
        if (neg) {
            c = read();
        }
        do {
            ret = ret * 10 + c - '0';
            c = read();
        } while (c > ' ');
        if (neg) {
            return -ret;
        }
        return ret;
    }

    private void fillBuffer() throws Exception {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1) {
            buffer[0] = -1;
        }
    }

    private byte read() throws Exception {
        if (bufferPointer == bytesRead) {
            fillBuffer();
        }
        return buffer[bufferPointer++];
    }
}