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

import java.awt.geom.Point2D;
import java.text.*;
import java.math.*;
import java.util.*;

public class Main implements Runnable {

	final String filename = "";

	public void solve() throws Exception {
		int n = 8;
		int[] x = new int[n];
		int[] y = new int[n];
		for (int i = 0; i < n; i++) {
			x[i] = iread();
			y[i] = iread();
		}
		boolean[] was = new boolean[8];
		int[] ind = new int[n];
		for (int a = 0; a < n; a++)
			for (int b = a + 1; b < n; b++) {
				int dx = x[b] - x[a], dy = y[b] - y[a];
				for (int a1 = 0; a1 < n; a1++) {
					if (x[a1] == x[a] + dy && y[a1] == y[a] - dx) {
						for (int b1 = 0; b1 < n; b1++) {
							if (x[b1] == x[b] + dy && y[b1] == y[b] - dx) {
								ind[0] = a;
								ind[1] = b;
								ind[2] = b1;
								ind[3] = a1;
								Arrays.fill(was, false);
								was[a] = was[b] = was[b1] = was[a1] = true;

								for (int c = 0; c < n; c++) {
									if (was[c])
										continue;
									for (int d = 0; d < n; d++) {
										if (was[d] || c == d)
											continue;
										for (int d1 = 0; d1 < n; d1++) {
											if (was[d1] || d1 == d || d1 == c)
												continue;

											int dx1 = x[d] - x[c], dy1 = y[d] - y[c];
											int dx2 = x[d1] - x[c], dy2 = y[d1] - y[c];
											if (dx1 * dx2 + dy1 * dy2 == 0) {
												for (int c1 = 0; c1 < n; c1++) {
													if (was[c1] || c1 == d || c1 == c || c1 == d1)
														continue;
													if (x[c] + dx1 + dx2 == x[c1] && y[c] + dy1 + dy2 == y[c1]) {
														ind[4] = c;
														ind[5] = d;
														ind[6] = c1;
														ind[7] = d1;
														out.write("YES\n");
														for (int i = 0; i < 4; i++) {
															out.write((ind[i] + 1) + "");
															if (i == 3)
																out.write("\n");
															else
																out.write(" ");
														}
														for (int i = 0; i < 4; i++) {
															out.write((ind[i + 4] + 1) + "");
															if (i == 3)
																out.write("\n");
															else
																out.write(" ");
														}
														return;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		out.write("NO\n");
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new BufferedWriter(new OutputStreamWriter(System.out));
			// in = new BufferedReader(new FileReader(filename+".in"));
			// out = new BufferedWriter(new FileWriter(filename+".out"));
			solve();
			out.flush();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	public int iread() throws Exception {
		return Integer.parseInt(readword());
	}

	public double dread() throws Exception {
		return Double.parseDouble(readword());
	}

	public long lread() throws Exception {
		return Long.parseLong(readword());
	}

	BufferedReader in;

	BufferedWriter out;

	public String readword() throws IOException {
		StringBuilder b = new StringBuilder();
		int c;
		c = in.read();
		while (c >= 0 && c <= ' ')
			c = in.read();
		if (c < 0)
			return "";
		while (c > ' ') {
			b.append((char) c);
			c = in.read();
		}
		return b.toString();
	}

	public static void main(String[] args) {
		try {
			Locale.setDefault(Locale.US);
		} catch (Exception e) {

		}
		// new Thread(new Main()).start();
		new Thread(null, new Main(), "1", 1 << 25).start();
	}
}