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

public class sample {
	static int[] x = new int[8];
	static int[] y = new int[8];
	static double eps = 1e-8;
	static boolean found = false;

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		for (int i = 0; i < 8; i++) {
			x[i] = in.nextInt();
			y[i] = in.nextInt();
		}
		perm(new int[8], new boolean[8], 0);
		if (!found)
			System.out.println("NO");
	}

	public static void perm(int[] a, boolean[] v, int at) {
		if (found)
			return;
		if (at == 8) {
			int[] A = { x[a[0]], y[a[0]] };
			int[] B = { x[a[1]], y[a[1]] };
			int[] C = { x[a[2]], y[a[2]] };
			int[] D = { x[a[3]], y[a[3]] };
			int[] i = { x[a[4]], y[a[4]] };
			int[] j = { x[a[5]], y[a[5]] };
			int[] k = { x[a[6]], y[a[6]] };
			int[] h = { x[a[7]], y[a[7]] };
			if (isSquare(A, B, C, D) && isRect(i, j, k, h)) {
				System.out.println("YES");
				System.out.printf("%d %d %d %d\n", a[0] + 1, a[1] + 1, a[2] + 1,
						a[3] + 1);
				System.out.printf("%d %d %d %d\n", a[4] + 1, a[5] + 1, a[6] + 1,
						a[7] + 1);
				found = true;
				return;
			}
		}
		for (int i = 0; i < v.length; i++) {
			if (!v[i]) {
				v[i] = true;
				a[at] = i;
				perm(a, v, at + 1);
				v[i] = false;
			}
		}
	}

	public static boolean isSquare(int[] A, int[] B, int[] C, int[] D) {
		double dist = dist(A, B);
		if (equals(dist, dist(B, C)) && equals(dist, dist(C, D))
				&& equals(dist, dist(D, A)))
			return isRect(A, B, C, D);
		return false;
	}

	public static boolean equals(double a, double b) {
		return Math.abs(a - b) <= eps;
	}

	public static boolean isRect(int[] A, int[] B, int[] C, int[] D) {
		if (dot(A, B, C) == 0 && dot(B, C, D) == 0 && dot(C, D, A) == 0
				&& dot(D, A, B) == 0) {
			int cross = cross(A, B, D);
			if (cross == cross(B, C, A) && cross == cross(C, D, B)
					&& cross == cross(D, A, C))
				return true;
		}
		return false;
	}

	public static int dot(int[] A, int[] B, int[] C) {
		// three points
		int[] AB = new int[2];
		int[] BC = new int[2];
		AB[0] = B[0] - A[0];
		AB[1] = B[1] - A[1];
		BC[0] = C[0] - B[0];
		BC[1] = C[1] - B[1];
		int dot = AB[0] * BC[0] + AB[1] * BC[1];
		return dot;
	}

	public static int cross(int[] A, int[] B, int[] C) {
		// three points
		int[] AB = new int[2];
		int[] AC = new int[2];
		AB[0] = B[0] - A[0];
		AB[1] = B[1] - A[1];
		AC[0] = C[0] - A[0];
		AC[1] = C[1] - A[1];
		return AB[0] * AC[1] - AB[1] * AC[0];
	}

	public static double dist(int[] A, int[] B) {
		// 2 points
		int a = A[0] - B[0];
		int b = A[1] - B[1];
		return Math.hypot(a, b);
	}
}