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.*;
import java.math.*;

public class Task {

    int code(Point[] a) {
        if (Point.convexHull(a).length < 4) {
            return 0;
        }
        int[] d = new int[6];
        int t = 0;
        for (int i = 0; i < 4; ++i) {
            for (int j = i + 1; j < 4; ++j) {
                d[t++] = (int) a[i].dist2(a[j]);
            }
        }
        Arrays.sort(d);
        if (d[0] != d[1]) return 0;
        if (d[2] != d[3]) return 0;
        if (d[4] != d[5]) return 0;
        if (d[4] != d[0] + d[2]) return 0;
        if (d[0] != d[2]) return 1;
        return 2;
    }

    public void solve() throws IOException {
        Point[] a = new Point[8];
        for (int i = 0; i < 8; ++i) {
            int x = in.nextInt();
            int y = in.nextInt();
            a[i] = new Point(x, y, i + 1);
        }
        for (int mask = 0; mask < (1 << 8); ++ mask) {
            if (Integer.bitCount(mask) != 4) continue;
            Point[] s = new Point[4];
            int ss = 0;
            Point[] r = new Point[4];
            int sr = 0;
            for (int i = 0; i < 8; ++i) {
                if (((mask >> i) & 1) == 1) {
                    s[ss++] = a[i];
                } else {
                    r[sr++] = a[i];
                }
            }
            if (code(s) == 2 && code(r) > 0) {
                out.println("YES");
                for (Point p : s) {
                    out.print(p.id + " ");
                }
                out.println();
                for (Point p : r) {
                    out.print(p.id + " ");
                }
                out.println();
                return;
            }
        }
        out.println("NO");
    }

    static FastReader in;
    static PrintWriter out;
    static PrintStream err;

    public static void main(String[] args) throws IOException {
        try {
            in = new FastReader();
            out = new PrintWriter(System.out);
            err = System.err;
            new Task().solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}

class FastReader {
    BufferedReader br;
    StringTokenizer in;

    FastReader() {
        this.br = new BufferedReader(new InputStreamReader(System.in));
    }

    FastReader(String filename) {
        try {
            this.br = new BufferedReader(new FileReader(filename));
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

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

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

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

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

class Point {
    int x;
    int y;
    int id;

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

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

    public long mulv(Point a) {
        return (long) this.x * a.y - (long) this.y * a.x;
    }

    public long len2() {
        return (long) this.x * this.x + (long) this.y * this.y;
    }

    public double len() {
        return Math.sqrt(this.len2());
    }

    public long dist2(Point a) {
        return (this.x - a.x) * (this.x - a.x) + (this.y - a.y) * (this.y - a.y);
    }

    public double dist(Point a) {
        return Math.sqrt((this.x - a.x) * (this.x - a.x) + (this.y - a.y) * (this.y - a.y));
    }

    public Point sub(Point a) {
        return new Point(this.x - a.x, this.y - a.y);
    }

    public Point add(Point a) {
        return new Point(this.x + a.x, this.y + a.y);
    }

    public static Point[] convexHull(Point[] t) {
        Point[] a = Arrays.copyOf(t, t.length);
        int n = a.length;
        int mn = 0;
        for (int i = 1; i < n; ++i) {
            if (a[i].x < a[mn].x || (a[i].x == a[mn].x && a[i].y < a[mn].y)) {
                mn = i;
            }
        }
        Point start = a[mn];
        a[mn] = a[0];
        a[0] = start;
        for (int i = 1; i < n; ++i) {
            a[i] = a[i].sub(start);
        }
        Arrays.sort(a, 1, a.length, new Comparator<Point>() {
            @Override
            public int compare(Point o1, Point o2) {
                long m = o1.mulv(o2);
                if (m != 0) {
                    return -Long.signum(m);
                }
                return Long.signum(o1.len2() - o2.len2());
            }
        });
        for (int i = 1; i < n; ++i) {
            a[i] = a[i].add(start);
        }
        Point[] h = new Point[n];
        int size = 0;
        for (Point p : a) {
            while (size > 1 && h[size - 1].sub(h[size - 2]).mulv(p.sub(h[size - 2])) <= 0) {
                --size;
            }
            h[size++] = p;
        }
        return Arrays.copyOf(h, size);
    }

    public static double perimeter(Point[] a) {
        double ret = 0;
        for (int i = 0; i < a.length; ++i) {
            ret += a[i].dist(a[(i + 1) % a.length]);
        }
        return ret;
    }
}