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.math.BigInteger;
import java.util.StringTokenizer;

public class Q136D implements Runnable {
    int[] x = new int[8];
    int[] y = new int[8];

    private void solve() throws IOException {
        for (int i = 0; i < 8; i++) {
            x[i] = nextInt();
            y[i] = nextInt();
        }
        for (int i = 15; i < (1 << 8); i++) {
            BigInteger bits = BigInteger.valueOf(i);
            if (bits.bitCount() == 4) {
                int pc = 0;
                int zc = 0;
                int[] p = new int[4];
                int[] z = new int[4];
                for (int s = 0; s < 8; s++) {
                    if (bits.testBit(s)) p[pc++] = s;
                    else z[zc++] = s;
                }

                if (isPR(p) && isPR(z)) {
                    int[] res = null;
                    int[] res2 = null;
                    if (isSQ(p)) {
                        res = p;
                        res2 = z;
                    } else if (isSQ(z)) {
                        res = z;
                        res2 = p;
                    }

                    if (res != null) {
                        writer.println("YES");
                        for (int q = 0; q < 4; q++) {
                            writer.print(res[q] + 1);
                            if (q < 3) writer.print(" ");
                        }
                        writer.println();
                        for (int q = 0; q < 4; q++) {
                            writer.print(res2[q] + 1);
                            if (q < 3) writer.print(" ");
                        }
                        return;
                    }
                }
            }
        }
        writer.print("NO");
    }

    private boolean isSQ(int[] p) {
        return isSQ(p, 1, 2, 3, 4) ||
                isSQ(p, 1, 2, 4, 3) ||
                isSQ(p, 1, 3, 2, 4);
    }

    private boolean isSQ(int[] p, int x1, int x2, int x3, int x4) {
        double d12 = dist(p, x1, x2);
        double d23 = dist(p, x2, x3);
        double d34 = dist(p, x3, x4);
        double d14 = dist(p, x1, x4);
        if (eq(d12, d23) && eq(d23, d34) && eq(d34, d14) && eq(d14, d12)) {
            if (eq(dot(p, x2, x1, x3) / (d12 * d23), 0) &&
                    eq(dot(p, x3, x2, x4) / (d23 * d34), 0) &&
                    eq(dot(p, x4, x3, x1) / (d34 * d14), 0) &&
                    eq(dot(p, x1, x4, x2) / (d14 * d12), 0)) {
                return true;
            }
        }
        return false;
    }

    private boolean isPR(int[] p) {
        return isPR(p, 1, 2, 3, 4) ||
                isPR(p, 1, 2, 4, 3) ||
                isPR(p, 1, 3, 2, 4);
    }

    double dist(int[] p, int x1, int x2) {
        int xx = x[p[x1-1]] - x[p[x2-1]];
        int yy = y[p[x1-1]] - y[p[x2-1]];
        return Math.sqrt(xx * xx + yy * yy);
    }

    private boolean isPR(int[] p, int x1, int x2, int x3, int x4) {
        double d12 = dist(p, x1, x2);
        double d23 = dist(p, x2, x3);
        double d34 = dist(p, x3, x4);
        double d14 = dist(p, x1, x4);
        if (eq(d12, d34) && eq(d23, d14)) {
            if (eq(dot(p, x2, x1, x3) / (d12 * d23), 0) &&
                    eq(dot(p, x3, x2, x4) / (d23 * d34), 0) &&
                    eq(dot(p, x4, x3, x1) / (d34 * d14), 0) &&
                    eq(dot(p, x1, x4, x2) / (d14 * d12), 0)) {
                return true;
            }
        }
        return false;
    }

    private boolean eq(double x1, double x2) {
        return Math.abs(x1 - x2) < 0.0000001;
    }


    //|A||B|Cos(θ)
    //Compute the dot product AB ⋅ BC
    int dot(int[] p, int x1, int x2, int x3) {
        int[] AB = new int[2];
        int[] BC = new int[2];
        AB[0] = x[p[x2-1]] - x[p[x1-1]];
        AB[1] = y[p[x2-1]] - y[p[x1-1]];
        BC[0] = x[p[x3-1]] - x[p[x1-1]];
        BC[1] = y[p[x3-1]] - y[p[x1-1]];
        int dot = AB[0] * BC[0] + AB[1] * BC[1];
        return dot;

        /*
*
AB[0] = B[0] - A[0];
AB[1] = B[1] - A[1];
AC[0] = C[0] - A[0];
AC[1] = C[1] - A[1];
int cross = AB[0] * AC[1] - AB[1] * AC[0];*/
    }

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

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() {
        try {
            boolean oj = System.getProperty("ONLINE_JUDGE") != null;
            reader = oj ? new BufferedReader(new InputStreamReader(System.in)) :
                    new BufferedReader(new FileReader(new File("input.txt")));
            tokenizer = null;
            writer = new PrintWriter(System.out);
            long start = System.currentTimeMillis();
            solve();
            reader.close();
            if (!oj) writer.print("\nTime: " + (System.currentTimeMillis() - start) + "\n");
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
}