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.util.*;

public class A implements Runnable {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private BufferedReader in;
    private PrintWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    private void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        String fileName = "";
        if (ONLINE_JUDGE && fileName.isEmpty()) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

    String readString() {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() {
        return Integer.parseInt(readString());
    }

    long readLong() {
        return Long.parseLong(readString());
    }

    double readDouble() {
        return Double.parseDouble(readString());
    }

    int[] readIntArray(int size) {
        int[] a = new int[size];
        for (int i = 0; i < size; i++) {
            a[i] = readInt();
        }
        return a;
    }

    public static void main(String[] args) {
        //new Thread(null, new A(), "", 128 * (1L << 20)).start();
        new A().run();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    @Override
    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    class Point {
        int x, y;
        int id;

        public Point(int x, int y, int id) {
            this.x = x;
            this.y = y;
            this.id = id;
        }

        Point rotate90(Point center) {
            Point res = new Point(x, y, -1);
            res.x -= center.x;
            res.y -= center.y;
            int swap = res.x;
            res.x = -res.y;
            res.y = swap;
            res.x += center.x;
            res.y += center.y;
            return res;
        }

        boolean equal(Point o) {
            return o.x == x && o.y == y;
        }
    }

    long getDistSqr(Point p1, Point p2) {
        long dx = p1.x - p2.x;
        long dy = p1.y - p2.y;
        return dx * dx + dy * dy;
    }

    boolean checkRectangle(Point p1, Point p2, Point p3, Point p4) {
        if (getDistSqr(p1, p2) != getDistSqr(p3, p4)) return false;
        if (getDistSqr(p1, p3) != getDistSqr(p2, p4)) return false;
        if (getDistSqr(p1, p4) != getDistSqr(p2, p3)) return false;

        int x1 = p2.x - p1.x;
        int y1 = p2.y - p1.y;

        int x2 = p4.x - p2.x;
        int y2 = p4.y - p2.y;

        return x1 * x2 + y1 * y2 == 0;
    }

    Point[] checkRectangleAndSetOrder(Point[] points) {
        for (int a = 0; a < 4; a++) {
            for (int b = 0; b < 4; b++) {
                for (int c = 0; c < 4; c++) {
                    for (int d = 0; d < 4; d++) {
                        if (a == b || a == c || a == d) continue;
                        if (b == c || b == d) continue;
                        if (c == d) continue;
                        if (a == 0 && d == 1) {
                            a = 0;
                        }
                        if (checkRectangle(points[a], points[b], points[c], points[d])) {
                            return new Point[]{points[a], points[b], points[c], points[d]};
                        }
                    }
                }
            }
        }
        return null;
    }

    boolean checkRectangle(Point[] points) {
        return checkRectangleAndSetOrder(points) != null;
    }

    boolean checkSquare(Point[] points) {
        Point[] rectangle = checkRectangleAndSetOrder(points);
        if (rectangle != null) {
            return getDistSqr(rectangle[0], rectangle[1]) == getDistSqr(rectangle[0], rectangle[2]);
        }
        return false;
    }

    private void solve() throws IOException {
        int n = 8;
        Point[] points = new Point[n];
        for (int i = 0; i < n; i++) {
            points[i] = new Point(readInt(), readInt(), i + 1);
        }

        for (int mask = 0; mask < (1 << n); mask++) {
            if (Integer.bitCount(mask) == n / 2) {
                Point[] square = new Point[n / 2];
                Point[] rectanle = new Point[n / 2];
                int s = 0, r = 0;
                for (int j = 0; j < n; j++) {
                    if (Integer.bitCount(mask & (1 << j)) == 0) {
                        square[s++] = points[j];
                    } else {
                        rectanle[r++] = points[j];
                    }
                }
                if (checkRectangle(rectanle) && checkSquare(square)) {
                    out.println("YES");
                    for (Point p : square) {
                        out.print(p.id + " ");
                    }
                    out.println();
                    for (Point p : rectanle) {
                        out.print(p.id + " ");
                    }
                    return;
                }
            }
        }
        out.println("NO");
    }
}