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.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.StringTokenizer;


public class CodeE
{
	static class Scanner
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		
		public String nextLine()
		{
			try
			{
				return br.readLine();
			}
			catch(Exception e)
			{
				throw(new RuntimeException());
			}
		}
		
		public String next()
		{
			while(!st.hasMoreTokens())
			{
				String l = nextLine();
				if(l == null)
					return null;
				st = new StringTokenizer(l);
			}
			return st.nextToken();
		}
		
		public int nextInt()
		{
			return Integer.parseInt(next());
		}
		
		public long nextLong()
		{
			return Long.parseLong(next());
		}
		
		public double nextDouble()
		{
			return Double.parseDouble(next());
		}
		
		public int[] nextIntArray(int n)
		{
			int[] res = new int[n];
			for(int i = 0; i < res.length; i++)
				res[i] = nextInt();
			return res;
		}
		
		public long[] nextLongArray(int n)
		{
			long[] res = new long[n];
			for(int i = 0; i < res.length; i++)
				res[i] = nextLong();
			return res;
		}
		
		public double[] nextDoubleArray(int n)
		{
			double[] res = new double[n];
			for(int i = 0; i < res.length; i++)
				res[i] = nextDouble();
			return res;
		}
		public void sortIntArray(int[] array)
		{
			Integer[] vals = new Integer[array.length];
			for(int i = 0; i < array.length; i++)
				vals[i] = array[i];
			Arrays.sort(vals);
			for(int i = 0; i < array.length; i++)
				array[i] = vals[i];
		}
		
		public void sortLongArray(long[] array)
		{
			Long[] vals = new Long[array.length];
			for(int i = 0; i < array.length; i++)
				vals[i] = array[i];
			Arrays.sort(vals);
			for(int i = 0; i < array.length; i++)
				array[i] = vals[i];
		}
		
		public void sortDoubleArray(double[] array)
		{
			Double[] vals = new Double[array.length];
			for(int i = 0; i < array.length; i++)
				vals[i] = array[i];
			Arrays.sort(vals);
			for(int i = 0; i < array.length; i++)
				array[i] = vals[i];
		}

		public String[] nextStringArray(int n) 
		{	
			String[] vals = new String[n];
			for(int i = 0; i < n; i++)
				vals[i] = next();
			return vals;
		}
		
		Integer nextInteger()
		{
			String s = next();
			if(s == null)
				return null;
			return Integer.parseInt(s);
		}
		
		int[][] nextIntMatrix(int n, int m)
		{
			int[][] ans = new int[n][];
			for(int i = 0; i < n; i++)
				ans[i] = nextIntArray(m);
			return ans;
		}
		
		static <T> T fill(T arreglo, int val)
		{
			if(arreglo instanceof Object[])
			{
				Object[] a = (Object[]) arreglo;
				for(Object x : a)
					fill(x, val);
			}
			else if(arreglo instanceof int[])
				Arrays.fill((int[]) arreglo, val);
			else if(arreglo instanceof double[])
				Arrays.fill((double[]) arreglo, val);
			else if(arreglo instanceof long[])
				Arrays.fill((long[]) arreglo, val);
			return arreglo;
		}
		
		<T> T[] nextObjectArray(Class <T> clazz, int size)
		{
			@SuppressWarnings("unchecked")
			T[] result = (T[]) java.lang.reflect.Array.newInstance(clazz, size);
			for(int c = 0; c < 3; c++)
			{
				Constructor <T> constructor;
				try 
				{
					if(c == 0)
						constructor = clazz.getDeclaredConstructor(Scanner.class, Integer.TYPE);
					else if(c == 1)
						constructor = clazz.getDeclaredConstructor(Scanner.class);
					else
						constructor = clazz.getDeclaredConstructor();
				} 
				catch(Exception e)
				{
					continue;
				}
				try
				{
					for(int i = 0; i < result.length; i++)
					{
						if(c == 0)
							result[i] = constructor.newInstance(this, i);
						else if(c == 1)
							result[i] = constructor.newInstance(this);
						else
							result[i] = constructor.newInstance();	
					}
				}
				catch(Exception e)
				{
					throw new RuntimeException(e);
				}
				return result;
			}
			throw new RuntimeException("Constructor not found");
		}
	}
	
	static int idA = 1;
	
	static class Punto
	{
		int x;
		int y;
		int id = idA++;
	
		public Punto(Scanner sc)
		{
			x = sc.nextInt();
			y = sc.nextInt();
		}
		
		public Punto(int xx, int yy)
		{
			x = xx;
			y = yy;
		}
		
		int tamSq()
		{
			return x * x + y * y;
		}
		
		int dotProduct(Punto a)
		{
			return x * a.x + y * a.y;
		}
		
		Punto resta(Punto a)
		{
			return new Punto(x - a.x, y - a.y);
		}
	}
	
	static boolean chequearRectangulo(List <Punto> puntos)
	{
		for(int i = 0; i < puntos.size(); i++)
		{
			Punto lineaA = puntos.get((i + 1) % puntos.size()).resta(puntos.get(i));
			Punto lineaB = puntos.get((i + 2) % puntos.size()).resta(puntos.get((i + 1) % puntos.size()));
			if(lineaA.dotProduct(lineaB) != 0) return false;
		}
		return true;
	}
	
	static boolean chequearCuadrado(List <Punto> puntos)
	{
		if(!chequearRectangulo(puntos)) return false;
		for(int i = 0; i < puntos.size(); i++)
		{
			Punto lineaA = puntos.get((i + 1) % puntos.size()).resta(puntos.get(i));
			Punto lineaB = puntos.get((i + 2) % puntos.size()).resta(puntos.get((i + 1) % puntos.size()));
			if(lineaA.tamSq() != lineaB.tamSq()) return false;
		}
		return true;
	}
	
	static boolean intentar(ArrayList <Punto> originales, LinkedList <Punto> actuales, boolean[] usados, boolean cuadrado)
	{
		if(actuales.size() == originales.size())
		{
			if(cuadrado) return chequearCuadrado(actuales);
			else return chequearRectangulo(actuales);
		}
		else
		{
			for(int i = 0; i < usados.length; i++)
			{
				if(!usados[i])
				{
					usados[i] = true;
					actuales.addFirst(originales.get(i));
					if(intentar(originales, actuales, usados, cuadrado))
						return true;
					actuales.pollFirst();
					usados[i] = false;
				}
			}
			return false;
		}
	}
	
	public static void main(String[] args)
	{
		Scanner sc = new Scanner();
		Punto[] puntos = sc.nextObjectArray(Punto.class, 8);
		int limite = 1 << 8;
		for(int i = 0; i < limite; i++)
		{
			if(Integer.bitCount(i) != 4) continue;
			ArrayList <Punto> enA = new ArrayList <Punto> ();
			ArrayList <Punto> enB = new ArrayList <Punto> ();
			for(int j = 0; j < 8; j++)
			{
				if((i & (1 << j)) != 0)
					enA.add(puntos[j]);
				else
					enB.add(puntos[j]);
			}
			if(intentar(enA, new LinkedList <Punto> (), new boolean[4], true) && intentar(enB, new LinkedList <Punto> (), new boolean[4], false)) 
			{
				System.out.println("YES");
				boolean empezo = false;
				for(Punto p : enA)
				{
					if(empezo)
						System.out.print(" ");
					empezo = true;
					System.out.print(p.id);
				}
				System.out.println();
				empezo = false;
				for(Punto p : enB)
				{
					if(empezo)
						System.out.print(" ");
					empezo = true;
					System.out.print(p.id);
				}
				System.out.println();
				return;
			}
		}
		System.out.println("NO");
	}

}