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.PrintWriter;
import java.util.Scanner;
import java.util.TreeSet;
import java.util.Vector;

public class Solution {
    static double e = 1e-9;

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

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

        TreeSet<Integer> allowed = new TreeSet<Integer>();
        for (int i = 0; i < 8; i++)
            allowed.add(i);
        Vector<Vector<Integer>> perm = getPerms(allowed);

        boolean yes = false;
        Vector<Integer> ans = new Vector<Integer>();

        for (Vector<Integer> v : perm) {
            if (isSquare(v.elementAt(0), v.elementAt(1), v.elementAt(2), v.elementAt(3), p)
                    && isRect(v.elementAt(4), v.elementAt(5), v.elementAt(6), v.elementAt(7), p)) {
                yes = true;
                ans.addAll(v);
                break;
            }
        }

        out.println(yes ? "YES" : "NO");
        for (int i = 0; yes && i < 8; i++) {
            out.print(ans.elementAt(i) + 1 + " ");
            if (i == 3)
                out.println();
        }
        out.close();
    }

    private static boolean isRect(int p1, int p2, int p3, int p4, Point[] p) {
        double a1 = Math.hypot(p[p1].x - p[p2].x, p[p1].y - p[p2].y);
        double a2 = Math.hypot(p[p2].x - p[p3].x, p[p2].y - p[p3].y);
        double a3 = Math.hypot(p[p3].x - p[p4].x, p[p3].y - p[p4].y);
        double a4 = Math.hypot(p[p4].x - p[p1].x, p[p4].y - p[p1].y);
        double d1 = Math.hypot(p[p1].x - p[p3].x, p[p1].y - p[p3].y);
        double d2 = Math.hypot(p[p2].x - p[p4].x, p[p2].y - p[p4].y);

        if (Math.abs(a1 * a1 + a2 * a2 - d1 * d1) > e || Math.abs(a2 * a2 + a3 * a3 - d2 * d2) > e
                || Math.abs(a3 * a3 + a4 * a4 - d1 * d1) > e || Math.abs(a4 * a4 + a1 * a1 - d2 * d2) > e)
            return false;

        return true;
    }

    private static boolean isSquare(int p1, int p2, int p3, int p4, Point[] p) {
        double a1 = Math.hypot(p[p1].x - p[p2].x, p[p1].y - p[p2].y);
        double a2 = Math.hypot(p[p2].x - p[p3].x, p[p2].y - p[p3].y);
        double a3 = Math.hypot(p[p3].x - p[p4].x, p[p3].y - p[p4].y);
        double a4 = Math.hypot(p[p4].x - p[p1].x, p[p4].y - p[p1].y);
        double d1 = Math.hypot(p[p1].x - p[p3].x, p[p1].y - p[p3].y);
        double d2 = Math.hypot(p[p2].x - p[p4].x, p[p2].y - p[p4].y);

        if (Math.abs(a1 - a2) > e || Math.abs(a2 - a3) > e || Math.abs(a3 - a4) > e || Math.abs(a4 - a1) > e)
            return false;

        if (Math.abs(a1 * a1 + a2 * a2 - d1 * d1) > e || Math.abs(a2 * a2 + a3 * a3 - d2 * d2) > e
                || Math.abs(a3 * a3 + a4 * a4 - d1 * d1) > e || Math.abs(a4 * a4 + a1 * a1 - d2 * d2) > e)
            return false;

        return true;
    }

    private static Vector<Vector<Integer>> getPerms(TreeSet<Integer> allowed) {
        Vector<Vector<Integer>> ans = new Vector<Vector<Integer>>();
        if (allowed.size() > 1)
            for (Integer i : allowed) {
                TreeSet<Integer> tmp = new TreeSet<Integer>();
                tmp.addAll(allowed);
                tmp.remove(i);
                Vector<Vector<Integer>> less_perm = getPerms(tmp);
                for (Vector<Integer> v : less_perm) {
                    Vector<Integer> tmptmp = new Vector<Integer>();
                    tmptmp.add(i);
                    tmptmp.addAll(v);
                    ans.add(tmptmp);
                }
            }
        else {
            Vector<Integer> tmp = new Vector<Integer>();
            tmp.addAll(allowed);
            ans.add(tmp);
        }

        return ans;
    }
}