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.util.*;



public class D {
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader r=new BufferedReader(new InputStreamReader(System.in));	
		Point[] points=new Point[8];
		for (int i = 0; i < points.length; i++) {
			String[] sp=r.readLine().split("[ ]+");
			points[i]=new Point(new Integer(sp[0]),new Integer(sp[1]));
		}
		for(int i=0;i<(1<<8);i++){
			if(Integer.bitCount(i)==4){
				Point[] set1=new Point[4];
				Point[] set2=new Point[4];
				Vector<Integer> a=new Vector<Integer>();
				Vector<Integer> b=new Vector<Integer>();
				int x=0,y=0;
				for(int j=0;j<8;j++){
					if(((1<<j)&i)==(1<<j)){
						set1[x++]=new Point(points[j].x,points[j].y);
						a.add(j+1);
					}
					else{
						set2[y++]=new Point(points[j].x,points[j].y);
						b.add(j+1);
					}
				}
				if(isSquare(set1)&&isRectangle(set2)){
					System.out.println("YES");
					print(a);
					print(b);
					System.exit(0);
				}
				else if(isSquare(set2)&&isRectangle(set1)){
					System.out.println("YES");
					print(b);
					print(a);
					System.exit(0);
				}
			}
		}
		System.out.println("NO");
	}

	private static void print(Vector<Integer> a) {
		System.out.println(a.get(0)+" "+a.get(1)+" "+a.get(2)+" "+a.get(3));
	}

	private static boolean isRectangle(Point[] set2) {
		isRect=false;
		s2=set2;
		dfsR(0,new int[]{0,1,2,3},new int[4],new boolean[4]);
		return isRect;
	}
static boolean isSquare;
static Point[] s1;
static boolean isRect;
static Point[] s2;
	private static boolean isSquare(Point[] set1) {
		isSquare=false;
		s1=set1;
		dfsS(0,new int[]{0,1,2,3},new int[4],new boolean[4]);
		return isSquare;
	}
	public static double len(Point a,Point b){
		double dx=a.x-b.x;
		double dy=a.y-b.y;
		double side=dx*dx+dy*dy; // Sqrt side ! 
		return side;
	}
	public static void dfsS(int i,int[] a,int[]order,boolean[] v){
		if(order.length==i){
			double dx=s1[order[0]].x-s1[order[1]].x;
			double dy=s1[order[0]].y-s1[order[1]].y;
			double side=dx*dx+dy*dy; // Sqrt side ! 
			boolean can=true;
			for(int j=0;j<4;j++){
				Point x=s1[order[j]];
				Point y=s1[order[(j+1)%4]];
				Point z=s1[order[(j+2)%4]];
				double hypt=len(x,z);
				double first=len(x,y);
				double sec=len(y,z);
				if(first+sec!=hypt){
					can=false;
					break;
				}
			}
			for(int j=0;j<4;j++){
				double s=len(s1[order[j]],s1[order[(j+1)%4]]);
				if(s!=side){
					can=false;
					break;
				}
			}
			if(can){
				isSquare=true;
			}
		}
		else{
		for(int j=0;j<a.length;j++){
			if(v[j]) continue;
			order[i]=a[j];
			v[j]=true;
			dfsS(i+1,a,order,v);
			v[j]=false;
		}
		}
	}
	
	
	public static void dfsR(int i,int[] a,int[]order,boolean[] v){
		if(order.length==i){
			double dx=s2[order[0]].x-s2[order[1]].x;
			double dy=s2[order[0]].y-s2[order[1]].y;
			double side=dx*dx+dy*dy; // Sqrt side ! 
			boolean can=true;
			for(int j=0;j<4;j++){
				Point x=s2[order[j]];
				Point y=s2[order[(j+1)%4]];
				Point z=s2[order[(j+2)%4]];
				double hypt=len(x,z);
				double first=len(x,y);
				double sec=len(y,z);
				if(first+sec!=hypt){
					can=false;
					break;
				}
			}
			double second=len(s2[order[1]],s2[order[2]]);
			double third=len(s2[order[2]],s2[order[3]]);
			double fourth=len(s2[order[3]],s2[order[0]]);
			if(side==third&&second==fourth){
				
			}
			else{
				can=false;
			}
			if(can){
				isRect=true;
			}
		}
		else{
		for(int j=0;j<a.length;j++){
			if(v[j]) continue;
			order[i]=a[j];
			v[j]=true;
			dfsR(i+1,a,order,v);
			v[j]=false;
		}
		}
	}
	
}