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.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: piyushd
 * Date: 3/29/11
 * Time: 7:56 PM
 * To ch ange this template use File | Settings | File Templates.
 */
public class TaskD {

    int[] x;
    int[] y;

    boolean isValid(int mask) {
        int[] squarex = new int[4];
        int[] squarey = new int[4];
        int[] recx = new int[4];
        int[] recy = new int[4];

        int ia = 0, ib = 0;
        for (int i = 0; i < 8; i++) {
            if ((mask & (1 << i)) > 0) {
                squarex[ia] = x[i];
                squarey[ia++] = y[i];
            } else {
                recx[ib] = x[i];
                recy[ib++] = y[i];
            }
        }

        boolean isSquare = true, isRec = true;
        int[][] xdiff = new int[4][4];
        int[][] ydiff = new int[4][4];
        int[][] dist = new int[4][4];
        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 4; j++) {
                xdiff[i][j] = squarex[i] - squarex[j];
                ydiff[i][j] = squarey[i] - squarey[j];
                dist[i][j] = xdiff[i][j] * xdiff[i][j] + ydiff[i][j] * ydiff[i][j];
            }
        }

        for (int i = 0; i < 4 && isSquare; i++) {
            int minDistance = Integer.MAX_VALUE;
            for (int j = 0; j < 4; j++) {
                if (j == i) continue;
                minDistance = Math.min(minDistance, dist[i][j]);
            }

            ArrayList<Integer> ix = new ArrayList<Integer>();
            for (int j = 0; j < 4; j++) {
                if (j == i) continue;
                if (dist[i][j] == minDistance) ix.add(j);
            }

            if (ix.size() == 2) {
                if (ydiff[i][ix.get(0)] * ydiff[i][ix.get(1)] + xdiff[i][ix.get(0)] * xdiff[i][ix.get(1)] == 0) {

                } else {
                    isSquare = false;
                }
            } else {
                isSquare = false;
            }
        }

        xdiff = new int[4][4];
        ydiff = new int[4][4];
        dist = new int[4][4];
        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 4; j++) {
                xdiff[i][j] = recx[i] - recx[j];
                ydiff[i][j] = recy[i] - recy[j];
                dist[i][j] = xdiff[i][j] * xdiff[i][j] + ydiff[i][j] * ydiff[i][j];
            }
        }

        for (int i = 0; i < 4 && isRec; i++) {
            int maxDistance = Integer.MIN_VALUE;
            for (int j = 0; j < 4; j++) {
                if (j == i) continue;
                maxDistance = Math.max(maxDistance, dist[i][j]);
            }

            ArrayList<Integer> ix = new ArrayList<Integer>();
            for (int j = 0; j < 4; j++) {
                if (j == i) continue;
                if (dist[i][j] != maxDistance) ix.add(j);
            }

            if (ix.size() == 2) {
                if (ydiff[i][ix.get(0)] * ydiff[i][ix.get(1)] + xdiff[i][ix.get(0)] * xdiff[i][ix.get(1)] == 0) {

                } else {
                    isRec = false;
                }
            } else {
                isRec = false;
            }
        }

        return isSquare && isRec;
    }

    void run() {
        x = new int[8];
        y = new int[8];
        for (int i = 0; i < 8; i++) {
            x[i] = nextInt();
            y[i] = nextInt();
        }

        int mask = -1;
        for (int i = 0; i < (1 << 8) && mask == -1; i++) {
            if (Integer.bitCount(i) == 4) {
                if (isValid(i)) mask = i;
            }
        }


        if (mask > 0) {
            System.out.println("YES");
            List<Integer> squarePoints = new ArrayList<Integer>();
            List<Integer> rectanglePoints = new ArrayList<Integer>();
            for (int i = 0; i < 8; i++) {
                if ((mask & (1 << i)) > 0) squarePoints.add(i);
                else rectanglePoints.add(i);
            }

            for (int a : squarePoints) System.out.print(a + 1 + " ");
            System.out.println();
            for (int a : rectanglePoints) System.out.print(a + 1 + " ");
            System.out.println();
        } else {
            System.out.println("NO");
        }

    }

    int nextInt() {
        try {
            int c = System.in.read();
            if (c == -1) return c;
            while (c != '-' && (c < '0' || '9' < c)) {
                c = System.in.read();
                if (c == -1) return c;
            }
            if (c == '-') return -nextInt();
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = System.in.read();
            } while ('0' <= c && c <= '9');
            return res;
        } catch (Exception e) {
            return -1;
        }
    }

    long nextLong() {
        try {
            int c = System.in.read();
            if (c == -1) return -1;
            while (c != '-' && (c < '0' || '9' < c)) {
                c = System.in.read();
                if (c == -1) return -1;
            }
            if (c == '-') return -nextLong();
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = System.in.read();
            } while ('0' <= c && c <= '9');
            return res;
        } catch (Exception e) {
            return -1;
        }
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String next() {
        try {
            StringBuilder res = new StringBuilder("");
            int c = System.in.read();
            while (Character.isWhitespace(c))
                c = System.in.read();
            do {
                res.append((char) c);
            } while (!Character.isWhitespace(c = System.in.read()));
            return res.toString();
        } catch (Exception e) {
            return null;
        }
    }

    String nextLine() {
        try {
            StringBuilder res = new StringBuilder("");
            int c = System.in.read();
            while (c == '\r' || c == '\n')
                c = System.in.read();
            do {
                res.append((char) c);
                c = System.in.read();
            } while (c != '\r' && c != '\n');
            return res.toString();
        } catch (Exception e) {
            return null;
        }
    }

    public static void main(String[] args) {
        new TaskD().run();
    }
}