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

public class Main {

    public final FastScanner in;
    public final PrintWriter out;

    public Main(String mode) throws IOException {
        if (mode.equals("console")) {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
        } else {
            in = new FastScanner(new File("input.txt"));
            out = new PrintWriter(new BufferedWriter(new FileWriter(new File(
                    "output.txt"))));
        }
    }

    public void close() throws IOException {
        out.close();
    }

    public static void main(String[] args) throws IOException {
        Main task = new Main(IO_MODE.CONSOLE);
        task.solve();
        task.out.close();
    }

       int[] isQuad(Vector p1, Vector p2, Vector p3, Vector p4)
        {
            
            int[]ans = new int[4];
            if (p1.length(p2) == p1.length(p3) && p1.length(p2) == p2.length(p4) && p1.is90(p2, p3) && p4.is90(p2, p3) && p2.is90(p1, p4)) {
                ans[0] = p1.index;
                ans[1] = p2.index;
                ans[2] = p3.index;
                ans[3] = p4.index;
                return ans;
            }

            return null;
        }
        
        
        boolean isPPPP (Vector p1, Vector p2, Vector p3, Vector p4) {
            
            if (isQuad(p1, p2, p3, p4) != null) return true;
            
            if (p1.is90(p2, p3) && p4.is90(p2, p3) && p2.is90(p1, p4)) {
                return true;
            }
            
            
            return false;
                    
        }
    
        public void test() {
            ArrayList<Vector> list= new ArrayList<Vector>();
            
//          Vector v1 = new Vector(0, 0), // A
//                  v2 = new Vector(4, 4), // B
//                  v3 = new Vector(4, 0), // C
//                  v4 = new Vector(0, 4); // D
            
            Vector v1 = new Vector(1, 2), // A
                    v2 = new Vector(2, 3), // B
                    v3 = new Vector(3, 2), // C
                    v4 = new Vector(2, 1); // D
            
            System.out.println(v1.length(v2));
            System.out.println(v2.length(v3));
            System.out.println(v3.length(v4));
            System.out.println(v4.length(v1));
            
            System.out.println(v1.is90(v2, v4));

            
            list.add(v1);
            list.add(v2);
            list.add(v3);
            list.add(v4);
            
            for (int i = 0; i < list.size(); i++) {
                for (int j = 0; j < list.size(); j++) {
                    for (int k = 0; k < list.size(); k++) {
                        for (int l = 0; l < list.size(); l++) {
                            if (i != j && i!=k && i!=l && j!=k && j!=l && k!=l) {                           
                                System.out.println(isPPPP(list.get(i), list.get(j), list.get(k), list.get(l)));
                            }
                        }
                    }
                }
            }
        }
        
        
        
    public void solve() throws IOException {
//      test();

        ArrayList<Vector> list = new ArrayList<Vector>();
        for (int i = 0; i < 8; i++) {
            Vector vec = new Vector(in.nextInt(), in.nextInt());
            vec.index = i;
            list.add(vec);
        }
        
        for (int i = 0; i < list.size(); i++) {
            for (int j = 0; j < list.size(); j++) {
                for (int k = 0; k < list.size(); k++) {
                    for (int l = 0; l < list.size(); l++) {
                        if (i != j && i!=k && i!=l && j!=k && j!=l && k!=l) {
    
                            int[]tab = null;
                            tab = isQuad(list.get(i), list.get(j), list.get(k), list.get(l));
                            if (tab != null) {
                                ArrayList<Integer>qwerty = new ArrayList<Integer>();
                                for (int m = 0; m < 8; m++) {
                                    qwerty.add(new Integer(m));
                                }
                                for (int m = 0; m < tab.length; m++) {
                                    if (qwerty.contains(tab[m])) {
                                        qwerty.remove(new Integer(tab[m]));
                                    }
                                }
                                for (int i2 = 0; i2 < qwerty.size(); i2++) {
                                    for (int j2 = 0; j2 < qwerty.size(); j2++) {
                                        for (int k2 = 0; k2 < qwerty.size(); k2++) {
                                            for (int l2 = 0; l2 < qwerty.size(); l2++) {
                                                if (i2 != j2 && i2!=k2 && i2!=l2 && j2!=k2 && j2!=l2 && k2!=l2) {
                                                    if (isPPPP(list.get(qwerty.get(i2)), list.get(qwerty.get(j2)), list.get(qwerty.get(k2)), list.get(qwerty.get(l2)))){
                                                        System.out.println("YES");
                                                        for (int m = 0; m < tab.length; m++) {
                                                            System.out.print(tab[m] + 1 + " ");
                                                        }
                                                        System.out.println();
                                                        for (int m = 0; m < qwerty.size(); m++) {
                                                            System.out.print(qwerty.get(m) + 1 + " ");
                                                        }
                                                        return;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        
        System.out.println("NO");

    }
}

class Vector {

    int index;
    double x, y;

    Vector() {
        x = 0;
        y = 0;
    }

    Vector(double x, double y) {
        this.x = x;
        this.y = y;
    }

    double length() {
        return Math.sqrt(x * x + y * y);
    }

    double length(Vector vec) {
        double X = Math.abs(vec.x - x), Y = Math.abs(vec.y - y);

        return Math.sqrt(X * X + Y * Y);
    }

    boolean is90(Vector p2, Vector p3) {
        double A = this.length(p2);
        double B = this.length(p3);
        double C = p2.length(p3);

        double res = round((A * A + B * B - C * C) / 2 * A * B);

        if (res == 0)
            return true;

        return false;
    }

    double round(double d) {
        d *= 100;
        d = (int)d;
        d /= 100;
        return d;
    }

}

class FastScanner {
    BufferedReader br;
    StringTokenizer st;

    FastScanner(InputStream in) {
        br = new BufferedReader(new InputStreamReader(in));
    }

    FastScanner(File file) throws FileNotFoundException {
        br = new BufferedReader(new FileReader(file));
    }

    String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                System.err.println(e);
                return "";
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

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

    float nextFloat() {
        return Float.parseFloat(next());
    }

    BigInteger nextBigInt() {
        return new BigInteger(next());
    }

    void close() {
        try {
            br.close();
        } catch (IOException e) {
        }
    }
}

class IO_MODE {
    public static final String CONSOLE = "console";
    public static final String FILE = "file";
}