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

public class TaskB {
	BufferedReader br;
	PrintWriter out;
	StringTokenizer stok;

	String nextToken() throws IOException {
		while (stok == null || !stok.hasMoreTokens()) {
			String s = br.readLine();
			if (s == null) {
				return "-1";
			}
			stok = new StringTokenizer(s);
		}
		return stok.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());
	}

	char nextChar() throws IOException {
		return (char) (br.read());
	}

	String nextLine() throws IOException {
		return br.readLine();
	}

	int[] x = new int[8];
	int[] y = new int[8];

	long dist(int x1, int y1, int x2, int y2) {
		return ((long) (x1) - (long) (x2)) * ((long) (x1) - (long) (x2))
				+ ((long) (y1) - (long) (y2)) * ((long) (y1) - (long) (y2));
	}

	boolean perp(int x1, int y1, int x2, int y2) {
		return x1 * x2 + y1 * y2 == 0;
	}

	boolean ok1(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) {
		if (!perp(x1 - x2, y1 - y2, x3 - x2, y3 - y2)
				|| !perp(x2 - x3, y2 - y3, x4 - x3, y4 - y3)
				|| !perp(x3 - x4, y3 - y4, x1 - x4, y1 - y4)
				|| !perp(x4 - x1, y4 - y1, x2 - x1, y2 - y1)) {
			return false;
		}
		return true;
	}

	boolean ok2(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) {
		if (!ok1(x1, y1, x2, y2, x3, y3, x4, y4)) {
			return false;
		}
		long x = dist(x1, y1, x2, y2);
		if (x != dist(x2, y2, x3, y3) || x != dist(x3, y3, x4, y4)
				|| x != dist(x4, y4, x1, y1)) {
			return false;
		}
		return true;
	}

	void solve() throws IOException {
		for (int i = 0; i < 8; i++) {
			x[i] = nextInt();
			y[i] = nextInt();
		}
		boolean[] used = new boolean[8];
		for (int i1 = 0; i1 < 8; i1++) {
			used[i1] = true;
			for (int i2 = 0; i2 < 8; i2++) {
				if (used[i2]) {
					continue;
				}
				used[i2] = true;
				for (int i3 = 0; i3 < 8; i3++) {
					if (used[i3]) {
						continue;
					}
					used[i3] = true;
					for (int i4 = 0; i4 < 8; i4++) {
						if (used[i4]) {
							continue;
						}
						used[i4] = true;
						for (int i5 = 0; i5 < 8; i5++) {
							if (used[i5]) {
								continue;
							}
							used[i5] = true;
							for (int i6 = 0; i6 < 8; i6++) {
								if (used[i6]) {
									continue;
								}
								used[i6] = true;
								for (int i7 = 0; i7 < 8; i7++) {
									if (used[i7]) {
										continue;
									}
									used[i7] = true;
									for (int i8 = 0; i8 < 8; i8++) {
										if (used[i8]) {
											continue;
										}
										if (ok2(x[i1], y[i1], x[i2], y[i2],
												x[i3], y[i3], x[i4], y[i4])
												&& ok1(x[i5], y[i5], x[i6],
														y[i6], x[i7], y[i7],
														x[i8], y[i8])) {
											out.println("YES");
											out.print(i1 + 1);
											out.print(' ');
											out.print(i2 + 1);
											out.print(' ');
											out.print(i3 + 1);
											out.print(' ');
											out.print(i4 + 1);
											out.println();
											out.print(i5 + 1);
											out.print(' ');
											out.print(i6 + 1);
											out.print(' ');
											out.print(i7 + 1);
											out.print(' ');
											out.print(i8 + 1);
											return;
										}
									}
									used[i7] = false;
								}
								used[i6] = false;
							}
							used[i5] = false;
						}
						used[i4] = false;
					}
					used[i3] = false;
				}
				used[i2] = false;
			}
			used[i1] = false;
		}
		out.print("NO");
	}

	void run() throws IOException {
		// br = new BufferedReader(new FileReader("taskb.in"));
		// out = new PrintWriter("taskb.out");
		// br = new BufferedReader(new FileReader("input.txt"));
		// out = new PrintWriter("output.txt");
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		br.close();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		// Locale.setDefault(Locale.US);
		new TaskB().run();
	}
}