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.lang.*;
import java.math.BigInteger;
import java.awt.geom.Point2D;
import java.io.*;
import java.util.*;

public class Solution implements Runnable{
    public static BufferedReader br;
    public static PrintWriter out;
    public static StringTokenizer stk;
    public static boolean isStream = true;

    public static void main(String[] args) throws IOException {
    	if (isStream) {
            br = new BufferedReader(new InputStreamReader(System.in));
        } else {
            br = new BufferedReader(new FileReader("in.txt"));
        }
        out = new PrintWriter(System.out);
        new Thread(new Solution()).start();
    }

    public void loadLine() {
        try {
            stk = new StringTokenizer(br.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
            return "";
        }
    }

    public String nextWord() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return stk.nextToken();
    }

    public Integer nextInt() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Integer.valueOf(stk.nextToken());
    }

    public Long nextLong() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Long.valueOf(stk.nextToken());
    }

    public Double nextDouble() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Double.valueOf(stk.nextToken());
    }
    
    public Float nextFloat() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Float.valueOf(stk.nextToken());
    }
    
    class P extends Point2D.Double {}

	int n = 8;
	
	Point2D.Double[] arr;
	
	int[] ans = null;
	
	int[] perm = new int[8];
	boolean[] used = new boolean[8];
	
	double EPS = 1e-12;
	
	boolean checkAngle(int p) {
		for (int i = p; i < p+4; i++) {
			Point2D.Double p1,p2,p3;
			p1 = arr[perm[(i-1+n)%4+p]];
			p2 = arr[perm[(i+n)%4+p]];
			p3 = arr[perm[(i+1+n)%4+p]];
			double x1 = p1.x-p2.x;
			double y1 = p1.y-p2.y;
			double x2 = p3.x-p2.x;
			double y2 = p3.y-p2.y;
			if (Math.abs(x1*x2 + y1*y2) > EPS) {
				return false;
			}
		}
		return true;
	}
	
	boolean checkSide(int p) {
		for (int i = p; i < p+4; i++) {
			Point2D.Double p1,p2,p3;
			p1 = arr[perm[(i-1+n)%4+p]];
			p2 = arr[perm[(i+n)%4+p]];
			p3 = arr[perm[(i+1+n)%4+p]];
			double x1 = p1.x-p2.x;
			double y1 = p1.y-p2.y;
			double x2 = p3.x-p2.x;
			double y2 = p3.y-p2.y;
			if (Math.abs(x1*x1+y1*y1 - (y2*y2+x2*x2)) > EPS) {
				return false;
			}
		}
		return true;
	}
	
	void check() {
		if (checkAngle(0) && checkSide(0) && checkAngle(4)) {
			ans = perm.clone();
		}
	}
	
	void solve(int p) {
		if (p == n) check();
		for (int i = 0; i < n; i++) {
			if (!used[i]) {
				perm[p] = i;
				used[i] = true;
				solve(p+1);
				used[i] = false;
				perm[p] = -1;
			}
		}
	}
	
    public void run() {
    	arr = new Point2D.Double[n];
    	for (int i = 0; i < n; i++) {
    		arr[i] = new Point2D.Double(nextInt(), nextInt());
    		used[i] = false;
    	}
    	solve(0);
    	if (ans == null) {
    		out.println("NO");
    	} else {
    		out.println("YES");
    		for (int i = 0; i < 4; i++) {
    			out.print(ans[i]+1);
    			out.print(" ");
    		}
    		out.println();
    		for (int i = 4; i < 8; i++) {
    			out.print(ans[i]+1);
    			out.print(" ");
    		}
    		out.println();
    	}
    	out.flush();
    }
}