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

@SuppressWarnings("unchecked")
public class P135B {

  class Point {
    int x, y;

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

    public int dist2(Point p) {
      return ((x - p.x) * (x - p.x) + (y - p.y) * (y - p.y));
    }

    public Point vectTo(Point p) {
      return new Point(p.x - x, p.y - y);
    }

    @Override
    public String toString() {
      return ("[x=" + x + ", y=" + y + "]");
    }
  }

  //------------------------------------------------------
  
  public static boolean nextPerm(int [] a) {
    int j, i = a.length - 2;
    for (; (i >= 0) && (a[i] > a[i + 1]); i--);
    if (i >= 0) {
      for (j = a.length - 1; a[i] > a[j]; j--);
      a[i] ^= a[j]; a[j] ^= a[i]; a[i] ^= a[j]; // swap(a[i], a[j])
      for (int l = i + 1, r = a.length - 1; l < r; l++, r--) {
        a[l] ^= a[r]; a[r] ^= a[l]; a[l] ^= a[r]; // swap(a[r], a[l])
      }
    }
    return (i >= 0);
  }

  //------------------------------------------------------

  int det(Point v1, Point v2) {
    return (v1.x * v2.y - v1.y * v2.x);
  }
  
  //------------------------------------------------------

  int scalar(Point v1, Point v2) {
    return (v1.x * v2.x + v1.y * v2.y);
  }
  
  //------------------------------------------------------

  boolean isBox(Point p1, Point p2, Point p3, Point p4) {
    int d2 = p1.dist2(p2);
    if ((p2.dist2(p3) == d2) && (p3.dist2(p4) == d2) && (p4.dist2(p1) == d2)) {
      Point v1 = p1.vectTo(p2), v2 = p2.vectTo(p3);
      if ((scalar(v1, v2) == 0) && det(v1, v2) > 0) {
        v1 = p2.vectTo(p3); v2 = p3.vectTo(p4);
        if ((scalar(v1, v2) == 0) && det(v1, v2) > 0) {
          v1 = p3.vectTo(p4); v2 = p4.vectTo(p1);
          if ((scalar(v1, v2) == 0) && det(v1, v2) > 0) {
            v1 = p4.vectTo(p1); v2 = p1.vectTo(p2);
            if ((scalar(v1, v2) == 0) && det(v1, v2) > 0) {
              return true;
            }
          }
        }
      }

    }
    
    return false;
  }

  //------------------------------------------------------

  boolean isRectangle(Point p1, Point p2, Point p3, Point p4) {
    if ((p1.dist2(p2) == p3.dist2(p4)) && (p2.dist2(p3) == p4.dist2(p1))) {
      Point v1 = p1.vectTo(p2), v2 = p2.vectTo(p3);
      if ((scalar(v1, v2) == 0) && det(v1, v2) > 0) {
        v1 = p2.vectTo(p3); v2 = p3.vectTo(p4);
        if ((scalar(v1, v2) == 0) && det(v1, v2) > 0) {
          v1 = p3.vectTo(p4); v2 = p4.vectTo(p1);
          if ((scalar(v1, v2) == 0) && det(v1, v2) > 0) {
            v1 = p4.vectTo(p1); v2 = p1.vectTo(p2);
            if ((scalar(v1, v2) == 0) && det(v1, v2) > 0) {
              return true;
            }
          }
        }
      }

    }
    
    return false;
  }

  //------------------------------------------------------

  public void run() throws Exception {
    Point [] p = new Point [8];
    for (int i = 0; i < 8; p[i] = new Point(nextInt(), nextInt()), i++);

    int [] pi = new int [8];
    for (int i = 1; i < 8; pi[i] = i, i++);
    do {
      if (isBox(p[pi[0]], p[pi[1]], p[pi[2]], p[pi[3]]) &&
          isRectangle(p[pi[4]], p[pi[5]], p[pi[6]], p[pi[7]])) {
        println("YES");
        println((pi[0] + 1) + " " + (pi[1] + 1) + " " + (pi[2] + 1) + " " + (pi[3] + 1));
        println((pi[4] + 1) + " " + (pi[5] + 1) + " " + (pi[6] + 1) + " " + (pi[7] + 1));
        return;
      }
    } while (nextPerm(pi));

    println("NO");
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P135B().run();
    br.close();
    pw.close();
    System.err.println("\n[Time : " + (System.currentTimeMillis() - startTime) + " ms]");
  }

  static long startTime = System.currentTimeMillis();
  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

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

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { print("" + o); }
  }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print(o); println(); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }

  int gcd(int a, int b) {
    return ((b > 0) ? gcd(b, a % b) : a);
  }
  long gcd(long a, long b) {
    return ((b > 0) ? gcd(b, a % b) : a);
  }
}