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.*;
import java.util.prefs.NodeChangeEvent;
import java.math.*;

public class Main implements Runnable {
	private BufferedReader in;
	private PrintWriter out;
	private StringTokenizer st;
	private Random rnd;
	
	private boolean checkRect(int[] x, int[] y, int[] dots, boolean checkDistance) {
		boolean ok = true;
		
		for(int i = 0; i < 4; i++) {
			boolean finded = false;
			
			for(int a = 0; a < 4; a++) {
				if(a == i) continue;
				
				for(int b = 0; b < 4; b++) {
					if(b == a || b == i) continue;
					
					int ci = dots[i], ca = dots[a], cb = dots[b];
					
					// check angle
					int angle = (x[ca] - x[ci]) * (x[cb] - x[ci]) + (y[ca] - y[ci]) * (y[cb] - y[ci]);
					if(angle != 0) continue;
					
					// check distance
					if(checkDistance) {
						int d1 = (x[ca] - x[ci]) * (x[ca] - x[ci]) + (y[ca] - y[ci]) * (y[ca] - y[ci]);
						int d2 = (x[cb] - x[ci]) * (x[cb] - x[ci]) + (y[cb] - y[ci]) * (y[cb] - y[ci]);
							
						if(d1 != d2) continue;
					}
					
					finded = true;
				}
			}
			
			if(!finded) ok = false;
		}
		
		return ok;
	}
	
	private void solve() throws IOException {
		int total = 1 << 8;
		
		int[] x = new int[8];
		int[] y = new int[8];
		
		for(int i = 0; i < 8; i++) {
			x[i] = nextInt();
			y[i] = nextInt();
		}
		
		int[] square = new int[4];
		int[] rect = new int[4];
		
		
		for(int mask = 0; mask < total; mask++) {
			if(Integer.bitCount(mask) != 4) continue;
			
			int l = 0, r = 0;
			
			for(int bit = 0; bit < 8; bit++) {
				if((mask & (1 << bit)) == 0) {
					square[l++] = bit;
				} else {
					rect[r++] = bit;
				}
			}
			
			boolean a = checkRect(x, y, square, true);
			boolean b = checkRect(x, y, rect, false);
			
			if(a && b) {
				out.println("YES");
				for(int i = 0; i < 4; i++) {
					out.print(square[i] + 1);
					out.print(' ');
				}
				out.print('\n');
				for(int i = 0; i < 4; i++) {
					out.print(rect[i] + 1);
					out.print(' ');
				}
				out.print('\n');
				
				return;
			}
		}
		
		out.println("NO");
	}
		
	public static void main(String[] args) {
		new Main().run();
	} 
	
	public void run() {
		try {
			try {
				in = new BufferedReader(new FileReader("INPUT.TXT"));
				out = new PrintWriter(new FileWriter("OUTPUT.TXT"));
			} catch(FileNotFoundException e) {
				in = new BufferedReader(new InputStreamReader((System.in)));
				out = new PrintWriter(System.out);
			}
			
			st = null;
			rnd = new Random();
			
			solve();
			
			out.close();
		} catch(IOException e) {
			e.printStackTrace();
		}	
	}
	
	private String nextToken() throws IOException, NullPointerException {
		while(st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		
		return st.nextToken();
	}
	
	private int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	
	private long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	
	private double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

}