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.InputStreamReader;
import java.io.IOException;
import java.awt.geom.Point2D;
import java.util.Iterator;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Sheng Cao
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        RectangleAndSquare solver = new RectangleAndSquare();
        solver.solve(1, in, out);
        out.close();
    }
}

class RectangleAndSquare {
    public static boolean eq(double a, double b){
        return Math.abs(a - b) < 1e-8;
    }
    public static boolean parallel(Point2D a, Point2D aa, Point2D b, Point2D bb){
        double x1 = aa.getX() - a.getX();
        double y1 = aa.getY() - a.getY();
        double x2 = bb.getX() - b.getX();
        double y2 = bb.getY() - b.getY();
        return eq(x1 * y2, x2 * y1);
    }
    public static boolean eqDist(Point2D a, Point2D aa, Point2D b, Point2D bb){
        double dist1 = a.distance(aa);
        double dist2 = b.distance(bb);
        return eq(dist1, dist2);
    }
    public static boolean isRightAngle(Point2D a, Point2D b, Point2D mid){
        double q = a.distance(mid);
        double w = b.distance(mid);
        double e = b.distance(a);
        q *= q;
        w*= w;
        e*=e;
        return eq(q + w, e);

    }
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        Point2D.Double[] l1 = new Point2D.Double[8];
        for (int i = 0;i < 8; i++){
            double x = in.nextInt();
            double y = in.nextInt();
            l1[i] = new Point2D.Double(x,y);
        }
        double[] q = new double[4];
        double[] w = new double[4];
        int[] pat = null;
        A:
        for (int[] e: FullPermutation.instance(8)){
            for (int i = 0; i < 4; i++){
                Point2D.Double a = l1[e[i]];
                Point2D.Double b = l1[e[(i + 1) % 4]];
                q[i] = a.distance(b);
            }
            for (int i = 0; i < 4; i++){
//              Debugz.print("aa",q[i] ,q[(i + 1) % 4]);
                if (!eq(q[i] ,q[(i + 1) % 4]) ) continue A;
            }

            if (!isRightAngle(l1[e[0]],l1[e[2]], l1[e[1]])) continue A;


            if (!parallel(l1[e[4]], l1[e[5]], l1[e[6]], l1[e[7]])) continue A;
            if (!parallel(l1[e[5]], l1[e[6]], l1[e[4]], l1[e[7]] )) continue A;

            if (!eqDist(l1[e[4]], l1[e[5]], l1[e[6]], l1[e[7]])) continue A;
            if (!eqDist(l1[e[5]], l1[e[6]], l1[e[4]], l1[e[7]])) continue A;
//          if (eq(l1[e[4]].distance(l1[e[5]]) + l1[e[5]].distance(l1[e[6]]),
//                        l1[e[4]].distance(l1[e[6]])
//                        )){
//              continue A;
//          }
//          if (eq(l1[e[5]].distance(l1[e[6]]) + l1[e[6]].distance(l1[e[7]]),
//                        l1[e[5]].distance(l1[e[7]])
//          )){
//              continue A;
//          }
            if (!isRightAngle(l1[e[4]],l1[e[6]], l1[e[5]])) continue A;

//          for (int i = 0; i < 4; i++){
//              Debugz.print("aa",q[i] ,q[(i + 1) % 4]);
//          }
//
//          Debugz.print(l1[e[4]].distance(l1[e[5]]),l1[e[6]].distance(l1[e[7]]));
//          Debugz.print(l1[e[5]].distance(l1[e[6]]),l1[e[7]].distance(l1[e[4]]));
//          Debugz.print(l1[e[4]].distance(l1[e[5]]) + l1[e[5]].distance(l1[e[6]]) - l1[e[4]].distance(l1[e[6]]));
//          Debugz.print(l1[e[5]].distance(l1[e[6]]) + l1[e[6]].distance(l1[e[7]]) - l1[e[5]].distance(l1[e[7]]));

            pat = e.clone();
        }
        if (pat != null){
            out.printLine("YES");
            Vectorz.addAll(pat, 1);
            out.printLine(pat[0], pat[1], pat[2], pat[3]);
            out.printLine(pat[4], pat[5], pat[6], pat[7]);
        }
        else {
            out.printLine("NO");
        }

    }
}

class InputReader {
    private BufferedReader in = null;
    private StringTokenizer st = null;

    public InputReader(InputStream usingStream) {
        in = new BufferedReader(new InputStreamReader(usingStream));

    }
    public String next(){
        for (;st == null || !st.hasMoreTokens();){
            String currentLine = null;
            try {
                currentLine = in.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (currentLine == null) return null;
            st = new StringTokenizer(currentLine);
        }
        return st.nextToken();
    }
    public int nextInt(){
        return Integer.parseInt(next());
    }

}

class OutputWriter {
    private PrintWriter usingPrintWriter = null;

    public OutputWriter(OutputStream usingStream){
        usingPrintWriter = new PrintWriter(usingStream);
    }
    public OutputWriter(Writer usingWriter){
        usingPrintWriter = new PrintWriter(usingWriter);
    }

    public void printLine(Object... l1){
        for (int i = 0;i < l1.length; i++){
            if (i != 0) usingPrintWriter.print(" ");
            usingPrintWriter.print(l1[i]);
        }
        usingPrintWriter.println();
    }
    public void flush(){
        usingPrintWriter.flush();
    }
    public void close(){
        flush();
        usingPrintWriter.close();
    }
}

class FullPermutation implements Iterable<int[]>{
    
    int[] cur = null;
    
    public static FullPermutation instance(int n1){
        FullPermutation fin = new FullPermutation();
        fin.cur = new int[n1];
        for (int i = 0 ; i < n1; i++){
            fin.cur[i] = i;
        }
        return fin;
    }
    
    public Iterator<int[]> iterator() {
        return new It();
    }
    
    public class It implements Iterator<int[]> {
        public boolean haveNext = true;
        public boolean advanced = true;
        public void advance(){
            if (advanced) return;
            advanced = true;

            haveNext = Combinationz.nextPerm(cur);
        }
        public boolean hasNext() {
            advance();
            return haveNext;
        }

        public int[] next() {
            advanced = false;
            return cur;
        }

        public void remove() {}
        
    }



    
}

class Vectorz {
    public static void addAll(int[] l1, int n1){
            for (int i = 0; i < l1.length; i++){
                l1[i] += n1;
            }
        }
}

class Combinationz {

    public static void swap(int[] l1, int a, int b){
            int k1 = l1[a];l1[a]=l1[b];l1[b]=k1;
        }
        public static void rev(int[] l1, int a, int b){
            for (int i = 0; i < (b-a+1)/2;i++) swap(l1,a+i,b-i);
        }
        public static boolean nextPerm(int[] l1) {
            for (int i = l1.length- 2; i >=0; i--) {
                if (l1[i] < l1[i + 1]){
                    for (int k = l1.length - 1; k>=0;k--){
                        if (l1[k]>=l1[i]){
                            swap(l1,i,k);
                            rev(l1,i+1,l1.length-1);
                            return true;
                        }
                    }
                }
            }
            rev(l1,0,l1.length-1);
            return false;
        }

}