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.util.*;
import java.io.*;
public class rectangulos{
public static int res[] = new int[4];
public static int nores[] = new int[4];
public static int pu[][];
//public static int jod = 0;
public static boolean paila = true;
public static void main(String args[]) throws IOException{
BufferedReader lector = new BufferedReader(new InputStreamReader(System.in));
pu = new int[8][2];
for(int n = 0;n<8;n++){
String t = lector.readLine();
pu[n][0]=Integer.parseInt(t.substring(0,t.indexOf(" ")));
pu[n][1]=Integer.parseInt(t.substring(t.indexOf(" ")+1));
}
hagale(0,4,4);
if(paila)
System.out.println("NO");
else{
System.out.println("YES");
for(int n = 0;n<4;n++)
System.out.print(res[n]+(n==3?"\n":" "));
for(int n = 0;n<4;n++)
System.out.print(nores[n]+(n==3?"\n":" "));
}
}
public static void hagale(int a,int b,int c){
if(!paila)return;
if(b<0)return;
if(a==8){
if(b!=0)return;
/*for(int n = 0;n<4;n++)
System.out.print(res[n]+" ");
System.out.println();
for(int n = 0;n<4;n++)
System.out.print(nores[n]+" ");
System.out.println("------");*/
HashSet<p> tal = new HashSet<p>();
HashSet<p> pen = new HashSet<p>();
int perm[] = new int[4];
boolean esCuad = false;
for(perm[0]=0;perm[0]<4 && !esCuad;perm[0]++){
for(perm[1] =0;perm[1]<4 && !esCuad;perm[1]++){
for(perm[2] = 0;perm[2]<4 && !esCuad;perm[2]++){
for(perm[3] = 0;perm[3]<4 && !esCuad;perm[3]++){
HashSet<Integer> jod = new HashSet<Integer>();
jod.add(perm[0]);jod.add(perm[1]);jod.add(perm[2]);jod.add(perm[3]);
if(jod.size()!=4)continue;
HashSet<Double> dist = new HashSet<Double>();
boolean si = true;
for(int n = 0;n<4;n++){
dist.add(Math.hypot(pu[res[perm[n]]-1][0]-pu[res[perm[(n+1)%4]]-1][0],pu[res[perm[n]]-1][1]-pu[res[perm[(n+1)%4]]-1][1]));
double d1 = Math.hypot(pu[res[perm[n]]-1][0]-pu[res[perm[(n+1)%4]]-1][0],pu[res[perm[n]]-1][1]-pu[res[perm[(n+1)%4]]-1][1]);
double d2 = Math.hypot(pu[res[perm[(n+2)%4]]-1][0]-pu[res[perm[(n+1)%4]]-1][0],pu[res[perm[(n+1)%4]]-1][1]-pu[res[perm[(n+2)%4]]-1][1]);
double d3 = Math.hypot(pu[res[perm[n]]-1][0]-pu[res[perm[(n+2)%4]]-1][0],pu[res[perm[n]]-1][1]-pu[res[perm[(n+2)%4]]-1][1]);
if(Math.abs(Math.hypot(d1,d2)-d3)>1e-6)si=false;
}
//System.out.println(res[perm[0]]+" "+res[perm[1]]+" "+res[perm[2]]+" "+res[perm[3]]+" "+dist+" "+si);
if(dist.size()==1 && si)esCuad = true;
}
}
}
}
if(esCuad){
perm = new int[4];
esCuad = false;
for(perm[0]=0;perm[0]<4 && !esCuad;perm[0]++){
for(perm[1] =0;perm[1]<4 && !esCuad;perm[1]++){
for(perm[2] = 0;perm[2]<4 && !esCuad;perm[2]++){
for(perm[3] = 0;perm[3]<4 && !esCuad;perm[3]++){
HashSet<Integer> jod = new HashSet<Integer>();
jod.add(perm[0]);jod.add(perm[1]);jod.add(perm[2]);jod.add(perm[3]);
if(jod.size()!=4)continue;
HashSet<Double> dist = new HashSet<Double>();
boolean si = true;
for(int n = 0;n<4;n++){
dist.add(Math.hypot(pu[nores[perm[n]]-1][0]-pu[nores[perm[(n+1)%4]]-1][0],
pu[nores[perm[n]]-1][1]-pu[nores[perm[(n+1)%4]]-1][1]));
double d1 = Math.hypot(pu[nores[perm[n]]-1][0]-pu[nores[perm[(n+1)%4]]-1][0],pu[nores[perm[n]]-1][1]-pu[nores[perm[(n+1)%4]]-1][1]);
double d2 = Math.hypot(pu[nores[perm[(n+2)%4]]-1][0]-pu[nores[perm[(n+1)%4]]-1][0],pu[nores[perm[(n+1)%4]]-1][1]-pu[nores[perm[(n+2)%4]]-1][1]);
double d3 = Math.hypot(pu[nores[perm[n]]-1][0]-pu[nores[perm[(n+2)%4]]-1][0],pu[nores[perm[n]]-1][1]-pu[nores[perm[(n+2)%4]]-1][1]);
if(Math.abs(Math.hypot(d1,d2)-d3)>1e-6)si=false;
}
if((dist.size()==2 || dist.size()==1) && si)esCuad = true;
//System.out.println("->"+nores[perm[0]]+" "+nores[perm[1]]+" "+nores[perm[2]]+" "+nores[perm[3]]+" "+dist+" "+si);
}
}
}
}
if(esCuad)paila = false;
}
//jod++;
return;
}
if(!paila)return;
if(c>0)
nores[4-c]=a+1;
hagale(a+1,b,c-1);
if(!paila)return;
if(b>0)
res[4-b]=a+1;
hagale(a+1,b-1,c);
}
}
class p implements Comparable{
boolean inf = false;
double x = 0.0;
int a = 0,b=0;
public p(double num,double dem,int a,int b){
if(dem==0.0)inf=true;
else
x = num/dem;
this.a = a;
this.b = b;
}
public boolean equals(Object o){
p a = (p)o;
return (inf && a.inf) || Math.abs(x-a.x)<1e-9;
}
public int compareTo(Object o){
if(this.equals(o))return 0;
return 1;
}
public String toString(){
return inf+" "+x;
}
public int hashCode(){
return (int)(x*1000000.0)+(inf?100000:0);
}
}