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 static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) throws IOException {
        try {
            if (new File("input.txt").exists())
                System.setIn(new FileInputStream("input.txt"));
        } catch (SecurityException e) {
        }
        new Main().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer st = new StringTokenizer("");

    private void run() throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }
    
    final double EPS = 1e-9;
    
    class Point implements Comparable<Point>{
        long x,y;
        
        public Point(long x, long y) {
            super();
            this.x = x;
            this.y = y;
        }
        
        public double dist(Point o) {
            return sqrt( (x - o.x) * (x - o.x) + (y - o.y) * (y - o.y) );
        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x)
                return Long.compare(x, o.x);
            return Long.compare(y, o.y);
        }
    }
    
    long scalarMul(Point middle, Point a, Point b) {
        return (a.x - middle.x) * (b.x - middle.x) + (a.y - middle.y) * (b.y - middle.y);
    }
    
    boolean isRectangle(Point[] point) {
        sort(point);
        return (scalarMul(point[0], point[1], point[2]) == 0) && (scalarMul (point[3], point[1], point[2]) == 0);
    }
    
    boolean isSquare(Point[] point) {
        
        return isRectangle(point) && abs(point[3].dist(point[1]) - point[1].dist(point[0])) < EPS;
    }
    
    Point[] point = new Point[8];

    int[] squareIndex = new int[4];
    int[] rectangleIndex = new int[4];
    
    Point[] square = new Point[4];
    Point[] rectangle = new Point[4];
    
    boolean[] used = new boolean[8];
    boolean dfs (int p) {
        if(p == 4) {
            int k = 0;
            for(int i = 0; i < 8; i++) {
                boolean existIndex = false;
                for(int j = 0; j < 4; j++) {
                    if(i == squareIndex[j])
                        existIndex = true;
                }
                if(!existIndex) {
                    rectangleIndex[k++] = i;
                }
            }
            
            for(int i = 0; i < 4; i++)
                square[i] = point[squareIndex[i]];
            for(int i = 0; i < 4; i++)
                rectangle[i] = point[rectangleIndex[i]];
            
//          System.err.println("Sq: " + Arrays.toString(squareIndex) + " " + isSquare(square));
//          System.err.println("Re: " + Arrays.toString(rectangleIndex) + " " + isRectangle(rectangle));
            
            if(isRectangle(rectangle) && isSquare(square))
                return true;
        } else {
            for(int i = 0; i < 8; i++) {
                if(!used[i]) {
                    used[i] = true;
                    squareIndex[p] = i;
                    if ( dfs( p + 1 ) )
                        return true;
                    used[i] = false;
                }
            }
        }
        return false;
    }
    
    private void solve() throws IOException {
        for(int i = 0; i < 8; i++) {
            point[i] = new Point(nextInt(), nextInt());
        }
        
//      Point[] p = new Point[4];
//      for(int i = 0; i < 4; i++)
//          p[i] = point[i];
//      sort(p);
//      for(int i = 0; i < 4; i++) {
//          out.println(p[i].x + " " + p[i].y);
//      }
//      System.err.println(isSquare(p));
        
        if(dfs(0)) {
            out.println("YES");
            for(int i = 0; i < 4; i++)
                out.print((squareIndex[i] + 1) + " ");
            out.println();
            for(int i = 0; i < 4; i++)
                out.print((rectangleIndex[i] + 1) + " ");
            out.println();
        } else {
            out.println("NO");
        }
    }
    
    String nextToken() throws IOException {
        while (!st.hasMoreTokens())
            st = new StringTokenizer(in.readLine());
        return st.nextToken();
    }
    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 nextLine() throws IOException {
        st = new StringTokenizer("");
        return in.readLine();
    }
    boolean EOF() throws IOException {
        while (!st.hasMoreTokens()) {
            String s = in.readLine();
            if (s == null)
                return true;
            st = new StringTokenizer(s);
        }
        return false;
    }
}