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.lang.*;
import java.awt.geom.Line2D;
import java.io.*;
import java.util.*;
import java.math.*;

public class B implements Runnable{
    
    double dist(int i, int j) {
        return Math.sqrt((x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]));
    }
    
    long sc(int p1, int i, int j) {
        long val = (x[i]-x[p1])*(x[j]-x[p1]) + (y[i]-y[p1])*(y[j]-y[p1]);
        return val;
    }
    
    long sq(int p1, int i, int j) {
        long val = (x[i]-x[p1])*(y[j]-y[p1]) - (x[j]-x[p1])*(y[i]-y[p1]);
        return val;
    }
    
    int[] x, y, idx, idx2;
    public void run() { 
        x = new int[8];
        y = new int[8];
        for (int i = 0; i < 8; ++i) {
            x[i] = nextInt();
            y[i] = nextInt();
        }
        
        boolean found = false;
        for (int mask = 0; mask < (1<<8); ++mask) {
            if (Integer.bitCount(mask) == 4) {
                idx = new int[4];
                int cnt = 0;
                for (int i = 0; i < 8; ++i) {
                    if ((mask & (1<<i)) != 0) {
                        idx[cnt] = i;
                        ++cnt;
                    }
                }
                
                
                boolean ok = false;
                int p1 = idx[0];
                for (int i = 1; i < 4; ++i) {
                    for (int j = 1; j < 4; ++j) {
                        if (i != j) {
                            int p2 = idx[i];
                            int p3 = idx[j];
                            if (sc(p1, p2, p3) == 0) {
                                for (int k = 1; k < 4; ++k) {
                                    if (k != i && k != j) {
                                        int p4 = idx[k];
                                        if (sc(p4, p2, p3) == 0) {
                                            if (Math.abs(dist(p4, p2) - dist(p4, p3)) < 1e-9 && 
                                            Math.abs(dist(p4,p3) - dist(p3,p1)) < 1e-9 &&
                                            Math.abs(dist(p3, p1) - dist(p1, p2)) < 1e-9 && 
                                            Math.abs(dist(p1, p2) - dist(p4,p2)) < 1e-9) {
                                                ok = true;
                                                break;
                                            }
                                        }
                                    }
                                }
                            }
                            
                            if (ok) {
                                break;
                            }
                        }
                        if (ok) {
                            break;
                        }
                    }
                }
                
                if (ok) {
                    //check if remaining is rectangle
                    
                    idx2 = new int[4];
                    cnt = 0;
                    for (int i = 0; i < 8; ++i) {
                        if ((mask & (1<<i)) == 0) {
                            idx2[cnt] = i;
                            ++cnt;
                        }
                    }
                    
                    boolean rect = false;
                    p1 = idx2[0];
                    for (int i = 1; i < 4; ++i) {
                        for (int j = 1; j < 4; ++j) {
                            if (i != j) {
                                int p2 = idx2[i];
                                int p3 = idx2[j]; 
                                if (sc(p1, p2, p3) == 0) {
                                    for (int k = 1; k < 4; ++k) {
                                        if (k != i && k != j) {
                                            int p4 = idx2[k];
                                            if (sc(p4, p2, p3) == 0) {
                                                rect = true;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    
                    
                    for (int i = 0; i < 4; ++i) {
                        for (int j = 0; j < 4; ++j) {
                            if (i != j) {
                                for (int k = 0; k < 4; ++k) {
                                    if (k != i && k != j) {
                                        if (sq(idx[i], idx[j], idx[k]) == 0 || 
                                                sq(idx[i], idx[j], idx[k]) == 0) {
                                            ok = false;
                                            rect = false;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    
                    if (rect && !found) {
                        found = true;
                        out.println("YES");
                        for (int i = 0; i < 4; ++i) {
                            out.print((idx[i] + 1) + " ");
                        }
                        out.println();
                        for (int i = 0; i < 4; ++i) {
                            out.print((idx2[i] + 1) + " ");
                        }
                        out.println();
                        break;
                    }
                    
                }
                if (found) {
                    break;
                }
            }
            if (found) {
                break;
            }
        }
        
        if (!found) {
            out.println("NO");
        }
        out.flush();
    }
    
    private static BufferedReader br = null;
    private static PrintWriter out = null;
    private static StringTokenizer stk = null;
    
    public static void main(String[] args) {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        (new Thread(new B())).start();
    }
    
    private void loadLine() {
        try {
            stk = new StringTokenizer(br.readLine());
        }
        catch (IOException e) {
            e.printStackTrace();
        }
    }
    
    private String nextLine() {
        try {
            return br.readLine();
        }
        catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
    
    private Integer nextInt() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Integer.parseInt(stk.nextToken());
    }
    
    private Long nextLong() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Long.parseLong(stk.nextToken());
    }
    
    private String nextWord() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return (stk.nextToken());
    }
    
    private Double nextDouble() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Double.parseDouble(stk.nextToken());
    }
}