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.io.*;
import java.util.Arrays;
import java.util.Comparator;
import java.util.LinkedList;

import static java.lang.Math.*;
import static java.lang.Integer.*;
public class D {
    static class P{
        int x, y;
        public P(int xx, int yy){
            x = xx; y = yy;
        }
    }
    public static double getDist(P p1, P p2){
        return sqrt(((p2.y - p1.y) * (p2.y - p1.y)) + ((p2.x - p1.x) * (p2.x - p1.x)));
    }
    public static boolean isSquare(P a, P b, P c, P d){
        P [] x = new P [] {a, b, c, d};
        Arrays.sort(x, new Comparator<P>() {
            public int compare(P a, P b){
                if(a.x > b.x)return 1;
                if(a.x < b.x)return -1;
                if(a.y > b.y)return 1;
                if(a.y < b.y)return -1;
                return 0;
            }
        });
        if(getDist(x[0], x[1]) - getDist(x[0], x[2]) < 1e-9
                && getDist(x[0], x[2]) - getDist(x[2], x[3]) < 1e-9
                && getDist(x[2], x[3]) - getDist(x[1], x[3]) < 1e-9
                && getDist(x[1], x[3]) - getDist(x[0], x[1]) < 1e-9
                && IsRectangleAnyOrder(a, b, c, d))
            return true;
        return false;
    }
    public static boolean IsOrthogonal(P a, P b, P c){
        return (b.x - a.x) * (b.x - c.x) + (b.y - a.y) * (b.y - c.y) == 0;
    }
    public static boolean IsRectangle(P a, P b, P c, P d)
    {
        return
            IsOrthogonal(a, b, c) &&
            IsOrthogonal(b, c, d) &&
            IsOrthogonal(c, d, a);
    }
    public static boolean IsRectangleAnyOrder(P a, P b, P c, P d)
    {
        return IsRectangle(a, b, c, d) ||
               IsRectangle(b, c, a, d) ||
               IsRectangle(c, a, b, d);
    }
    public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int [] x = new int [8];
        int [] y = new int [8];
        for(int i = 0 ; i < 8 ; ++i){
            String [] use = br.readLine().split(" ");
            x[i] = parseInt(use[0]);
            y[i] = parseInt(use[1]);
        }
        for(int i = 0 ; i < 8 ; ++i){
            for(int j = 0 ; j < 8 ; ++j){
                for(int k = 0 ; k < 8 ; ++k){
                    for(int l = 0 ; l < 8 ; ++l){
                        if(i == j || j == k || k == l
                                || i == k || i == l || j == l)
                            continue;
                        LinkedList<Integer> s1 = new LinkedList<Integer>();
                        s1.add(i); s1.add(j);s1.add(k);s1.add(l);
                        boolean ss1 = IsRectangleAnyOrder(new P(x[i], y[i])
                        , new P(x[j], y[j]), new P(x[k], y[k]),
                                new P(x[l], y[l]));
                        if(!ss1)
                            continue;
                        LinkedList<Integer> s2 = new LinkedList<Integer>();
                        for(int o = 0 ; o < 8 ; ++o){
                            if(s1.contains(o))
                                continue;
                            s2.add(o);
                        }
                        int i1 = s2.get(0);
                        int i2 = s2.get(1);
                        int i3 = s2.get(2);
                        int i4 = s2.get(3);
                        boolean ss2 = isSquare(new P(x[i1], y[i1]), new P(x[i2], y[i2]),
                                new P(x[i3], y[i3]),
                                new P(x[i4], y[i4]));
                        if(ss1 && ss2){
                            System.out.println("YES");
                            for(int m : s2)
                                System.out.print((m + 1) + " ");
                            System.out.println();
                            for(int m : s1)
                                System.out.print((m + 1) + " ");
                            return;
                        }
                            
                    }
                }
            }
        }
        System.out.println("NO");
    }

}