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.awt.Point;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class D97 {

	static boolean test = false;
	Point[] pts = null;
	boolean solved = false;
	private void solve() throws Throwable {
		pts = new Point[8];
		for (int i = 0; i < 8; i++) {
			pts[i] = new Point(iread(), iread());
		}
		go(new int[8], 0);
		if(!solved){
			System.out.println("NO");
		}
	}

	private void go(int[] is, int pos) {
		if(solved){
			return;
		}
		
		if(pos == 8){
			//test the solution
			List<Point> squareList = new ArrayList<Point>();
			List<Point> rectList = new ArrayList<Point>();
			
			for (int i = 0; i < is.length; i++) {
				if(is[i] == 1){
					squareList.add(pts[i]);
				} else {
					rectList.add(pts[i]);
				}
			}
			
			if(squareList.size() != 4){
				return;
			}
			
			if(isSquare(squareList) && isRect(rectList)){
				solved = true;
				//print
				String s1 = "";
				String s2 = "";
				
				for (int i = 0; i < is.length; i++) {
					if(is[i] == 1){
						s1 += (i+1) + "";
						if(i < is.length-1){
							s1 += " ";
						}
					}
					if(is[i] == 0){
						s2 += (i+1) + "";
						if(i < is.length-1){
							s2 += " ";
						}
					}
				}
				System.out.println("YES");
				System.out.println(s1);
				System.out.println(s2);
				return;
			}
			
			
		} else {
			is[pos] = 0;
			go(is, pos+1);
			is[pos] = 1;
			go(is, pos+1);
			is[pos] = 0;
		}
	}

	private boolean isRect(List<Point> rectList) {
		
		int zeros = 0;
		
		for (int i = 0; i < rectList.size(); i++) {
			for (int j = i+1; j < rectList.size(); j++) {
				Point point = rectList.get(i);
				Point point2 = rectList.get(j);
				for (int k = 0; k < rectList.size(); k++) {
					if(k == j || k == i){
						continue;
					}
					Point base = rectList.get(k);
					double x1 = point.getX() - base.getX();
					double x2 = point2.getX() - base.getX();
					double y1 = point.getY() - base.getY();
					double y2 = point2.getY() - base.getY();
					if(Math.abs(x1*x2 + y1*y2) < 0.0000001){
						zeros ++;
					}
				}
			}
		}
		
		return zeros == 4;
	}

	private boolean isSquare(List<Point> squareList) {
		List<Double> d = new ArrayList<Double>();
		
		for (int i = 0; i < squareList.size(); i++) {
			for (int j = i+1; j < squareList.size(); j++) {
				d.add(dist(squareList.get(i), squareList.get(j)));
			}
		}
		Collections.sort(d);
		if(same(d.get(0), d.get(1)) && same(d.get(0), d.get(2))&& same(d.get(0), d.get(3))&& same(d.get(4), d.get(5))){
			return true;
		}
		
		return false;
	}

	private boolean same(Double double1, Double double2) {
		if(Math.abs(double1 - double2) <= 0.0000001){
			return true;
		}
		return false;
	}

	private Double dist(Point point, Point point2) {
		return (point.getX() - point2.getX())*(point.getX() - point2.getX()) + (point.getY() - point2.getY())*(point.getY() - point2.getY());
	}

	public int iread() throws Exception {
		return Integer.parseInt(wread());
	}

	public double dread() throws Exception {
		return Double.parseDouble(wread());
	}

	public long lread() throws Exception {
		return Long.parseLong(wread());
	}

	public String wread() throws IOException {
		StringBuilder b = new StringBuilder();
		int c;
		c = in.read();
		while (c >= 0 && c <= ' ')
			c = in.read();
		if (c < 0)
			return "";
		while (c > ' ') {
			b.append((char) c);
			c = in.read();
		}
		return b.toString();
	}

	public static void main(String[] args) throws Throwable {
		new D97().solve();
		out.close();
	}

	public D97() throws Throwable {
		if (test) {
			in = new BufferedReader(new FileReader(new File(testDataFile)));
		} else {
			new BufferedReader(inp);
		}
	}

	static InputStreamReader inp = new InputStreamReader(System.in);
	static BufferedReader in = new BufferedReader(inp);
	static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

	static String testDataFile = "testdata.txt";
	BufferedReader reader = null;
}