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 static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		try {
			if (new File("input.txt").exists())
				System.setIn(new FileInputStream("input.txt"));
		} catch (SecurityException e) {
		}
		new Main().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

	final int n = 8;
	Point p[] = new Point[n];
	private void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		in.close();
		out.close();
	}
	void solve() throws IOException{
		for(int i = 0; i < n; i++)
			p[i] = new Point(nextInt(), nextInt());
		
		int d1[] = new int[6];
		int d2[] = new int[6];
		int p1, p2;
		for(int mask = 0; mask < 1 << 8; mask++){
			if(Integer.bitCount(mask) != 4) continue;
			p1 = p2 = 0;
			for(int i = 0; i < n; i++)
				for(int j = i + 1; j < n; j++){
					if( (mask & (1 << i)) != 0 && (mask & (1 << j)) != 0)
						d1[p1++] = dist(i, j);
					if( (mask & (1 << i)) == 0 && (mask & (1 << j)) == 0)
						d2[p2++] = dist(i, j);
				}
			boolean valid = true;
			sort(d1);
			for(int i = 0; i < 4; i++)
				if(d1[0] != d1[i] || d1[0] == 0)
					valid = false;
			if(d1[4] != d1[5]) 
				valid = false;
			sort(d2);
			for(int i = 0; i < 6; i += 2){
				if(d2[i] == 0 || d2[i] != d2[i + 1])
					valid = false;
			}
			
			for(int i = 0; i < n; i++){boolean diam = false;
				for(int j = 0; j < n; j++){
					if( (mask & (1 << i)) != 0 && (mask & (1 << j)) != 0 && dist(i, j) == d1[5])
						diam = true;
					if( (mask & (1 << i)) == 0 && (mask & (1 << j)) == 0 && dist(i, j) == d2[5])
					diam = true;
				}
				valid &= diam;
			}
			
			if(!valid) continue;
			out.println("YES");
			boolean first = true;
			for(int i = 0; i < n; i++)
				if((mask & (1 << i)) != 0){
					if(first) first = false; else out.print(" ");
					out.print((i + 1));
				}
			out.println();
			first = true;
			for(int i = 0; i < n; i++)
				if((mask & (1 << i)) == 0){
					if(first) first = false; else out.print(" ");
					out.print((i + 1));
				}
			out.println();
			System.err.println(Arrays.toString(d2));
			return;
		}
		out.println("NO");
	}

	int dist(int i, int j){
		return sqr(p[i].x - p[j].x) + sqr(p[i].y - p[j].y);
	}
	
	int sqr(int x){
		return x * x;
	}
	class Point{
		int x, y;
		Point(int xx, int yy){
			x = xx;
			y = yy;
		}
	}
	boolean vec(Point c, Point a, Point b){
		return (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x) != 0L;
	}
	void chk(boolean b) {
		if (b)
			return;
		System.out.println(new Error().getStackTrace()[1]);
		exit(999);
	}
	void deb(String fmt, Object... args) {
		System.out.printf(Locale.US, fmt + "%n", args);
	}
	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());
	}
	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;
	}
}