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.awt.geom.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.regex.*;
import static java.lang.Math.*;
public class B {

    public B() throws Exception {
        int[] X = new int[8];
        int[] Y = new int[8];
        for (int i=0;i<8;i++) {
            X[i] = in.nextInt();
            Y[i] = in.nextInt();
        }

        boolean[] used = new boolean[8];
        boolean success = false;
        for (int a1=0;a1<8;a1++) {
            used[a1] = true;
            for (int a2=a1+1;a2<8;a2++) {
                if (used[a2]) continue;
                if (X[a1]==X[a2]&&Y[a1]==Y[a2]) continue;
                used[a2] = true;

                int x3 = X[a2]-(Y[a2]-Y[a1]);
                int y3 = Y[a2]+(X[a2]-X[a1]);
                int x4 = x3-(y3-Y[a2]);
                int y4 = y3+(x3-X[a2]);
                int x1 = x4-(y4-y3);
                int y1 = y4+(x4-x3);
                if (x1!=X[a1]||y1!=Y[a1]) {
                    debug("failed");
                }
                // debug(a1,a2);

                for (int a3=0;a3<8;a3++) {
                    if (used[a3]) continue;
                    if (X[a3]!=x3||Y[a3]!=y3) continue;
                    used[a3] = true;
                    // debug(a1,a2,a3);

                    for (int a4=0;a4<8;a4++) {
                        if (used[a4]) continue;
                        if (X[a4]!=x4||Y[a4]!=y4) continue;
                        used[a4] = true;

                        // debug(a1,a2,a3,a4);
                        for (int a5=0;a5<8;a5++) {
                            if (used[a5]) continue;
                            used[a5] = true;

                            for (int a6=0;a6<8;a6++) {
                                if (used[a6]) continue;
                                used[a6] = true;

                                for (int a7=0;a7<8;a7++) {
                                    if (used[a7]) continue;
                                    used[a7] = true;

                                        for (int a8=0;a8<8;a8++) {
                                            if (used[a8]) continue;
                                            if (success) continue;

                                            if (X[a6]-X[a5]!=X[a7]-X[a8]||Y[a6]-Y[a5]!=Y[a7]-Y[a8]) continue;
                                            if (X[a7]-X[a6]!=X[a8]-X[a5]||Y[a7]-Y[a6]!=Y[a8]-Y[a5]) continue;

                                            if ((X[a6]-X[a5])*(X[a7]-X[a6])+(Y[a6]-Y[a5])*(Y[a7]-Y[a6])!=0) continue;

                                            success = true;

                                            buf.append("YES\n");
                                            buf.append(a1+1).append(' ');
                                            buf.append(a2+1).append(' ');
                                            buf.append(a3+1).append(' ');
                                            buf.append(a4+1).append('\n');
                                            buf.append(a5+1).append(' ');
                                            buf.append(a6+1).append(' ');
                                            buf.append(a7+1).append(' ');
                                            buf.append(a8+1).append('\n');
                                                
                                            break;
                                        }



                                    used[a7] = false;
                                }


                                used[a6] = false;
                            }


                            used[a5] = false;
                        }

                        used[a4] = false;
                    }
                    used[a3] = false;


                }
                
                used[a2] = false;
            }
            used[a1] = false;
        }

        if (!success)
            buf.append("NO\n");

        System.out.print(buf);
    }

    Scanner in = new Scanner(System.in);
    StringBuilder buf = new StringBuilder();
    public static void main(String[] args) throws Exception { // {{{
        new B();
    } // }}}
    public static void debug(Object... arr) { // {{{
        System.err.println(Arrays.deepToString(arr));
    } // }}}
}