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.geom.Line2D;
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.fill;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.sort;

public class Main {
	public static void main(String[] args) throws IOException {
		new Thread(null, new Runnable() {
			public void run() {
				try {
					try {
						if (new File("input.txt").exists())
							System.setIn(new FileInputStream("input.txt"));
					} catch (SecurityException e) {}
					
					long prevTime = System.currentTimeMillis();
					new Main().run();
					System.err.println("Total time: " + (System.currentTimeMillis() - prevTime) + " ms");
					System.err.println("Memory status: " + memoryStatus());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}, "1", 1L << 24).start(); 
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		out.close();
		in.close();
	}
	
	/*************************************************************** 
	 * Solution
	 **************************************************************/
	
	final int pNum = 8;
	
	void solve() throws IOException  {
		Point[] ps = new Point [pNum];
		for (int i = 0; i < pNum; i++) {
			ps[i] = new Point(i + 1, nextInt(), nextInt());
		}
		
		int MASK = (1 << pNum) - 1;
		for (int mask = 0; mask < (1 << pNum); mask++) {
			if (Integer.bitCount(mask) == 4) {
				Point[] s1 = getPoints(ps, mask);
				Point[] s2 = getPoints(ps, (~mask) & MASK);
				if (checRect(s1, true) && checRect(s2, false)) {
					out.println("YES");
					printArray(s1);
					printArray(s2);
					return;
				}
			}
		}
		out.println("NO");
	}

	Point[] getPoints(Point[] ps, int mask) {
		Point[] ret = new Point [4];
		int k = 0;
		for (int i = 0; i < pNum; i++) {
			if ((mask & (1 << i)) != 0) {
				ret[k++] = ps[i];
			}
		}
		return ret;
	}
	
	boolean checRect(Point[] set, boolean checkSquare) {
		for (int A = 0; A < 4; A++) {
			for (int B = 0; B < 4; B++) {
				if (B == A) continue;
				for (int C = 0; C < 4; C++) {
					if (C == A || C == B) continue;
					if (vec(set[A], set[B], set[C]) == 0L) {
						return false;
					}
				}
			}
		}
		for (int A = 0; A < 4; A++) {
			for (int B = 0; B < 4; B++) {
				if (B == A) continue;
				for (int C = 0; C < 4; C++) {
					if (C == A || C == B) continue;
					for (int D = 0; D < 4; D++) {
						if (D == A || D == B || D == C) continue;
						if (its(set[A], set[B], set[C], set[D])) {
							if (mul(set[A], set[D], set[C]) == 0L && mul(set[B], set[D], set[C]) == 0L && mul(set[D], set[B], set[A]) == 0L && mul(set[C], set[B], set[A]) == 0L) {
								if (checkSquare && dist2(set[A], set[D]) != dist2(set[A], set[C])) {
									continue;
								}
								
//								System.err.println("A=" + A + ", B=" + B + ", C=" + C + ", D=" +D);
//								System.err.println(set[A] + " " + set[B] + " " + set[C] + " " + set[D]);
								
								return true;
							}
						}
					}
				}
			}
		}
		return false;
	}

	boolean its(Point p1, Point p2, Point p3, Point p4) {
		return Line2D.linesIntersect(p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y);
	}

	long dist2(Point p1, Point p2) {
		return sqr(p2.x - p1.x) + sqr(p2.y - p1.y);
	}

	long sqr(long x) {
		return x * x;
	}

	long mul(Point p0, Point p1, Point p2) {
		return (p1.x - p0.x) * (p2.x - p0.x) + (p1.y - p0.y) * (p2.y - p0.y);
	}
	
	long vec(Point p0, Point p1, Point p2) {
		return (p1.x - p0.x) * (p2.y - p0.y) - (p1.y - p0.y) * (p2.x - p0.x);
	}
	
	class Point {
		int id;
		long x;
		long y;
		
		public Point(int id, long x, long y) {
			this.id = id;
			this.x = x;
			this.y = y;
		}
		
		@Override
		public String toString() {
			return "" + id;
		}
	}
	
	/*************************************************************** 
	 * Input 
	 **************************************************************/
	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");
	
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	
	int[] nextIntArray(int size) throws IOException {
		int[] ret = new int [size];
		for (int i = 0; i < size; i++)
			ret[i] = nextInt();
		return ret;
	}
	
	long[] nextLongArray(int size) throws IOException {
		long[] ret = new long [size];
		for (int i = 0; i < size; i++)
			ret[i] = nextLong();
		return ret;
	}
	
	double[] nextDoubleArray(int size) throws IOException {
		double[] ret = new double [size];
		for (int i = 0; i < size; i++)
			ret[i] = nextDouble();
		return ret;
	}
	
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
	
	/*************************************************************** 
	 * Output 
	 **************************************************************/
	void printRepeat(String s, int count) {
		for (int i = 0; i < count; i++)
			out.print(s);
	}
	
	void printArray(int[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0) out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}
	
	void printArray(long[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0) out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}
	
	void printArray(double[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0) out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}
	
	void printArray(double[] array, String spec) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0) out.print(' ');
			out.printf(Locale.US, spec, array[i]);
		}
		out.println();
	}
	
	void printArray(Object[] array) {
		boolean blank = false;
		for (Object x : array) {
			if (blank) out.print(' '); else blank = true;
			out.print(x);
		}
		out.println();
	}
	
	@SuppressWarnings("rawtypes")
	void printCollection(Collection collection) {
		boolean blank = false;
		for (Object x : collection) {
			if (blank) out.print(' '); else blank = true;
			out.print(x);
		}
		out.println();
	}
	
	/*************************************************************** 
	 * Utility
	 **************************************************************/
	static String memoryStatus() {
		return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory() >> 20) + "/" + (Runtime.getRuntime().totalMemory() >> 20) + " MB";
	}
	
	static void checkMemory() {
		System.err.println(memoryStatus());
	}
	
	static long prevTimeStamp = Long.MIN_VALUE;
	
	static void updateTimer() {
		prevTimeStamp = System.currentTimeMillis();
	}
	
	static long elapsedTime() {
		return (System.currentTimeMillis() - prevTimeStamp);
	}
	
	static void checkTimer() {
		System.err.println(elapsedTime() + " ms");
	}
}