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.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;
 
public class D {
        
        final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE")!=null;
        BufferedReader in;
        PrintWriter out;
        StringTokenizer tok = new StringTokenizer("");
        
        void init() throws FileNotFoundException{
                if (ONLINE_JUDGE){
                        in = new BufferedReader(new InputStreamReader(System.in));
                        out = new PrintWriter(System.out);
                }else{
                        in = new BufferedReader(new FileReader("input.txt"));
                        out = new PrintWriter("output.txt");
                }
        }
        
        String readString() throws IOException{
                while(!tok.hasMoreTokens()){
                        tok = new StringTokenizer(in.readLine());
                }
                return tok.nextToken();
        }
        
        int readInt() throws IOException{
                return Integer.parseInt(readString());
        }
        
        long readLong() throws IOException{
                return Long.parseLong(readString());
        }
        
        double readDouble() throws IOException{
                return Double.parseDouble(readString());
        }
        
        public static void main(String[] args){
                new D().run();
        }
        
        public void run(){
                try{
                        long t1 = System.currentTimeMillis();
                        init();
                        solve();
                        out.close();
                        long t2 = System.currentTimeMillis();
                        System.err.println("Time = "+(t2-t1));
                }catch (Exception e){
                        e.printStackTrace(System.err);
                        System.exit(-1);
                }
        }
        
       
        void solve() throws IOException{
        	int n = 8;
        	int[][] a = new int[n][2];
        	for(int i = 0; i < n; i++){
        		a[i][0] = readInt();
        		a[i][1] = readInt();
        	}
        	for(int i = 0; i < (1 << n); i++){
        		
        		ArrayList<Integer> sq = new ArrayList<Integer>();
        		ArrayList<Integer> rec = new ArrayList<Integer>();
        		for(int j = 0; j < n; j++){
        			if((i & (1 << j)) == 0)rec.add(j);
        			else sq.add(j);
        		}
        		double eps = pow(0.1, 9);
        		if(sq.size() != rec.size()) continue;
        		double[][] m = new double[4][4];
        		for(int j = 0; j < 4; j++)
        			for(int k = j+1; k < 4; k++){
        				long x1 = a[sq.get(j)][0];
        				long y1 = a[sq.get(j)][1];
        				long x2 = a[sq.get(k)][0];
        				long y2 = a[sq.get(k)][1];
        				m[j][k] = m[k][j] = distance(x1, y1, x2, y2);
        			}
        		boolean checkSq = true;
        		if(abs(m[0][1] - m[2][3]) < eps  && abs(m[0][2] - m[1][3]) < eps && abs(m[0][3] - m[1][2]) < eps){
        			double min = m[0][1];
        			for(int j = 2; j < 4; j++){
        				if(m[0][j] < min) min = m[0][j];
        			}
        			for(int j = 2; j < 4; j++){
        				if(abs(m[0][j] - min) < eps) continue;
        				if(abs(m[0][j] - min * sqrt(2)) < eps) continue;
        				checkSq = false;
        			}
        		}
        		else{
        			checkSq = false;
        		}
        		if(!checkSq) continue;
        		if(i == 15){
        			int crw = 0;
        		}
        		boolean checkRec = true;
        		for(int j = 0; j < 4; j++){
        			boolean check1 = false;
        			for(int k = 0; k < 4; k++){
        				for(int l = 0; l < 4; l++){
        					if(j == k || j == l || k == l) continue;
        					int x1 = a[rec.get(j)][0];
        					int x2 = a[rec.get(k)][0];
        					int x3 = a[rec.get(l)][0];
        					int y1 = a[rec.get(j)][1];
        					int y2 = a[rec.get(k)][1];
        					int y3 = a[rec.get(l)][1];
        					if(scalar(x1,y1,x2,y2,x1,y1,x3,y3) < eps)
        						check1 = true;        					
        				}
        			}
        			if(!check1) checkRec = false;
        		}
        		if(checkRec){
        			out.println("YES");
        			for(int j = 0; j < 4; j++){
        				out.print((sq.get(j)+1)+ " ");        				
        			}
        			out.println();
        			for(int j = 0; j < 4; j++){
        				out.print((rec.get(j)+1)+ " ");        				
        			}
        			return;
        		}
        			
        	}
        	out.println("NO");
        }
        
        double scalar(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4){
        	return (x1-x2)*(x3-x4) + (y1-y2)*(y3-y4);
        }
        
        
        int[] zFunction(char[] s){
        	int[] z = new int[s.length];
        	z[0] = 0;
        	for (int i=1, l=0, r=0; i<s.length; ++i) {
        		if (i <= r)
        			z[i] = min (r-i+1, z[i-l]);
        		while (i+z[i] < s.length && s[z[i]] == s[i+z[i]])
        			++z[i];
        		if (i+z[i]-1 > r){
        			l = i; 
        			r = i+z[i]-1;
        		}
        	}	
        	return z;
        }
        
        int[] prefixFunction(char[] s){
        	int[] pr = new int[s.length];
        	for (int i = 1; i< s.length; ++i) {
        		int j = pr[i-1];
        		while (j > 0 && s[i] != s[j])
        			j = pr[j-1];
        		if (s[i] == s[j])  ++j;
        		pr[i] = j;
        	}
        	return pr;
        }
        
        int ModExp(int a, int n, int mod){
        	int res = 1;
        	while (n!=0)
        		if ((n & 1) != 0) {
        			res = (res*a)%mod;
        			--n;
        		}
        		else {
        			a = (a*a)%mod;
        			n >>= 1;
        		}
        	return res;
        }
        
        
        static class Utils {
 
                private Utils() {}
 
                public static void mergeSort(int[] a) {
                        mergeSort(a, 0, a.length - 1);
                }
 
                private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
                        final int MAGIC_VALUE = 50;
                        if (leftIndex < rightIndex) {
                                if (rightIndex - leftIndex <= MAGIC_VALUE) {
                                        insertionSort(a, leftIndex, rightIndex);
                                } else {
                                        int middleIndex = (leftIndex + rightIndex) / 2;
                                        mergeSort(a, leftIndex, middleIndex);
                                        mergeSort(a, middleIndex + 1, rightIndex);
                                        merge(a, leftIndex, middleIndex, rightIndex);
                                }
                        }
                }
 
                private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
                        int length1 = middleIndex - leftIndex + 1;
                        int length2 = rightIndex - middleIndex;
                        int[] leftArray = new int[length1];
                        int[] rightArray = new int[length2];
                        System.arraycopy(a, leftIndex, leftArray, 0, length1);
                        System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
                        for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
                                if (i == length1) {
                                        a[k] = rightArray[j++];
                                } else if (j == length2) {
                                        a[k] = leftArray[i++];
                                } else {
                                        a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
                                }
                        }
                }
 
                private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
                        for (int i = leftIndex + 1; i <= rightIndex; i++) {
                                int current = a[i];
                                int j = i - 1;
                                while (j >= leftIndex && a[j] > current) {
                                        a[j + 1] = a[j];
                                        j--;
                                }
                                a[j + 1] = current;
                        }
                } 
        }
        
       
        
        boolean isPrime(int a){
        	for(int i = 2; i <= sqrt(a); i++)
        		if(a % i == 0) return false;
        	return true;
        }
        
        static double distance(long x1, long y1, long x2, long y2){
        	return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
        }
        
        static long gcd(long a, long b){
        	if(min(a,b) == 0) return max(a,b);
        	return gcd(max(a, b) % min(a,b), min(a,b));
        }
        
        static long lcm(long a, long b){
        	return a * b /gcd(a, b);
        }
}