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 static java.lang.System.in;
import static java.lang.System.out;

import java.io.*;
import java.util.*;
import static java.lang.Math.*;


//Same as B135
public class D136 {
	public static Scanner sc = new Scanner(in);
	StringBuilder sb = new StringBuilder();
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	double eps = 0.000001;
	public boolean checkR(P ver[], int ind []){
		for (int i=0; i<4; i++)
			if (Math.abs(P.arg(ver[ind[i]], ver[ind[(i+1)%4]], ver[ind[(i+2)%4]])-Math.PI/2)>eps) return false;
		return true;
	}
	public boolean checkS(P ver[], int ind []){
		if (checkR(ver, ind)==false) return false;
		if (Math.abs(ver[ind[0]].dist2(ver[ind[1]])-ver[ind[1]].dist2(ver[ind[2]]))>eps) return false;
		return true;
	}
	public void run() throws IOException {
		String input;
		String[] inputArray;
		P [] ver = new P[8];
		int [] index = new int[8];
		for (int i=0; i<8; i++){
			input = br.readLine();
			inputArray = input.split(" ");
			ver[i]= new P(Integer.valueOf(inputArray[0]),Integer.valueOf(inputArray[1])) ;
			index[i]=i;
		}
		int [] rec = new int[4], sq = new int[4];
		do{
			for (int k=0; k<4; k++)
				for (int i=0; i<8; i++)
					if (index[i]==k) rec[k]=i;
			if (checkR(ver,rec)==false) continue;
			for (int k=4; k<8; k++)
				for (int i=0; i<8; i++)
					if (index[i]==k) sq[k-4]=i;
			if (checkS(ver,sq)==false) continue;
			ln("YES");
			for (int i=0; i<3; i++)
				sb.append(++sq[i]+" ");
			sb.append(++sq[3]+"\n");
			for (int i=0; i<3; i++)
				sb.append(++rec[i]+" ");
			sb.append(++rec[3]);
			ln(sb);
			return;
		}while (Permutation.next_permutation(index));
		ln("NO");
	}

	public static void main(String[] args) throws IOException {
		new D136().run();
	}
	public static void ln(Object obj) {
		out.println(obj);
	}
	static class Permutation{
		static boolean next_permutation(int[]as) {
			int n = as.length;
			for (int i = n - 1; i > 0; i--) {
				if (as[i - 1] < as[i]) {
					int j = n;
					while (as[i - 1] >= as[--j]);
					swap(as, i - 1, j);
					reverse(as, i, n);
					return true;
				}
			}
			return false;
		}
		static void swap(int[] is, int i, int j) {
			int t = is[i];
			is[i] = is[j];
			is[j] = t;
		}
		static void reverse(int[] is, int s, int t) {
			while (s < --t) swap(is, s++, t);
		}
	}
	static class P{
		
			static final double EPS=1e-10;
			static int signum(double x){
				return x<-EPS?-1:x>EPS?1:0;
			}
		static Comparator<P> comp=new Comparator<P>(){
			public int compare(P p1, P p2) {
				return signum(p1.x-p2.x)!=0?signum(p1.x-p2.x):signum(p1.y-p2.y);
			}
		};
		public static  final P O=new P(0,0);
		final double x,y;
		P(double _x,double _y){
			x=_x;y=_y;
		}
		
		P add(P a){
			return new P(x+a.x,y+a.y);
		}
		P sub(P a){
			return new P(x-a.x,y-a.y);
		}
		P mul(P a){
			return new P(x*a.x-y*a.y,x*a.y+y*a.x);
		}
		P div(P a){
			double d2=a.dist2(O);
			return new P(dot(a,this)/d2,cross(a,this)/d2);
		}
		
		P conj(){
			return new P(x,-y);
		}
		
		static double dot(P a,P b){
			return  a.x*b.x+a.y*b.y;
		}
		
		static double cross(P a,P b){
			return  a.x*b.y-a.y*b.x;
		}
		
		double dist2(P p){
			return (x-p.x)*(x-p.x)+(y-p.y)*(y-p.y);
		}
		
		double dist(P p){
			return sqrt(dist2(p));
		}
		public double norm(){
			return dist(O);
		}
		
		static int ccw(P a,P b,P c){
			b=b.sub(a);c=c.sub(a);
			if(cross(b,c)>EPS)return 1;
			if(cross(b,c)<-EPS)return -1;
			if(dot(b,c)<-EPS)return 2;
			if(b.norm()<c.norm()-EPS)return -2;
			return 0;
		}
		static double arg(P a,P b, P c){
			double angleA = P.arg(a,b);
			double angleB = P.arg(b,c);
			double angle =  Math.PI+angleA-angleB;
			if (angle-2*Math.PI>EPS) angle-=2*Math.PI;
			return angle;
		}
		
		static double arg(P A,P B){
			if (A.equals(B)) return 0;
			P dir=B.sub(A);
			double s=acos(dir.x/dir.norm());
			return dir.y>=0?s:2*PI-s;
		}
		
		P rotate(P o,double arg){
			return this.add(this.sub(o).mul(new P(cos(arg),sin(arg))));
		}
		
		static double S2(P a,P b,P o){
			return cross(a.sub(o),b.sub(o));
		}
		static double S(P a,P b,P o){
			return S2(a,b,o)/2;
		}
		
		static P polar(double abs,double arg){
			return new P(abs*cos(arg),abs*sin(arg));
		}
		
		static P proj(P p,P o){
			return o.mul(new P(dot(p,o)/o.norm(),0));
		}
		public boolean equals(Object obj) {
			if(obj instanceof P){
				P p=(P)obj;
				return signum(x-p.x)==0 && signum(y-p.y)==0;
			}
			return false;
		}
		public String toString(){
			return "("+x+","+y+")";
		}
	}
}