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.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		Point[] points = new Point[8];
		for (int i = 0; i < 8; i++)
			points[i] = new Point(sc.nextInt(), sc.nextInt());

		for (int sq1 = 0; sq1 < 8; sq1++) {
			for (int sq2 = 0; sq2 < 8; sq2++) {
				if (sq2 == sq1)
					continue;
				for (int sq3 = 0; sq3 < 8; sq3++) {
					if (sq3 == sq1 || sq3 == sq2)
						continue;
					for (int sq4 = 0; sq4 < 8; sq4++) {
						if (sq4 == sq1 || sq4 == sq2 || sq4 == sq3)
							continue;
						for (int rec1 = 0; rec1 < 8; rec1++) {
							if (rec1 == sq1 || rec1 == sq2 || rec1 == sq3 || rec1 == sq4)
								continue;
							for (int rec2 = 0; rec2 < 8; rec2++) {
								if (rec2 == sq1 || rec2 == sq2 || rec2 == sq3 || rec2 == sq4 || rec2 == rec1)
									continue;
								for (int rec3 = 0; rec3 < 8; rec3++) {
									if (rec3 == sq1 || rec3 == sq2 || rec3 == sq3 || rec3 == sq4 || rec3 == rec1
											|| rec3 == rec2)
										continue;
									for (int rec4 = 0; rec4 < 8; rec4++) {
										if (rec4 == sq1 || rec4 == sq2 || rec4 == sq3 || rec4 == sq4 || rec4 == rec1
												|| rec4 == rec2 || rec4 == rec3)
											continue;

										if (square(points[sq1], points[sq2], points[sq3], points[sq4])
												&& rectangle(points[rec1], points[rec2], points[rec3], points[rec4])) {
											out.println("YES");
											out.println(++sq1 + " " + ++sq2 + " " + ++sq3 + " " + ++sq4);
											out.println(++rec1 + " " + ++rec2 + " " + ++rec3 + " " + ++rec4);
											out.flush();
											return;
										}
									}
								}
							}
						}
					}
				}
			}
		}

		out.println("NO");
		out.flush();
		out.close();
	}

	static boolean square(Point p1, Point p2, Point p3, Point p4) {
		return (p1.sqd(p2) == p2.sqd(p3) && p2.sqd(p3) == p3.sqd(p4) && p3.sqd(p4) == p4.sqd(p1)
				&& 2 * p1.sqd(p2) == p1.sqd(p3));
	}

	static boolean rectangle(Point p1, Point p2, Point p3, Point p4) {
		return (p1.sqd(p2) == p4.sqd(p3) && p2.sqd(p3) == p1.sqd(p4) && p2.sqd(p3) + p1.sqd(p2) == p1.sqd(p3));
	}

	static class Point {
		int x, y;

		Point(int xx, int yy) {
			x = xx;
			y = yy;
		}

		int sqd(Point p) {
			return sq(x - p.x) + sq(y - p.y);
		}
	}

	static int sq(int x) {
		return x * x;
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String s) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

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

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}