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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
bool is90(int x1, int y1, int x2, int y2, int x3, int y3) {
  int ax = x2 - x1;
  int ay = y2 - y1;
  int bx = x3 - x2;
  int by = y3 - y2;
  int cx = x3 - x1;
  int cy = y3 - y1;
  return (ax * ax + ay * ay + bx * bx + by * by == cx * cx + cy * cy);
}
bool isrect2(int *x, int *y, int *i) {
  for (int j = 0; j < 4; j++) {
    if (!is90(x[i[j]], y[i[j]], x[i[(j + 1) & 3]], y[i[(j + 1) & 3]],
              x[i[(j + 2) & 3]], y[i[(j + 2) & 3]]))
      return false;
  }
  return true;
}
bool isrect(int *x, int *y, int *i) {
  bool b = false;
  for (int j1 = 1; j1 < 4; j1++) {
    for (int j2 = 1; j2 < 4; j2++) {
      if (j1 == j2) continue;
      for (int j3 = 1; j3 < 4; j3++) {
        if (j1 == j3 || j2 == j3) continue;
        int k[4] = {i[0], i[j1], i[j2], i[j3]};
        b = b || isrect2(x, y, k);
      }
    }
  }
  return b;
}
bool issquare2(int *x, int *y, int *i) {
  int cx = x[i[0]] - x[i[3]];
  int cy = y[i[0]] - y[i[3]];
  int c = cx * cx + cy * cy;
  for (int j = 0; j < 3; j++) {
    int dx = x[i[j]] - x[i[j + 1]];
    int dy = y[i[j]] - y[i[j + 1]];
    int d = dx * dx + dy * dy;
    if (c != d) return false;
  }
  return true;
}
bool issquare(int *x, int *y, int *i) {
  bool b = false;
  for (int j1 = 1; j1 < 4; j1++) {
    for (int j2 = 1; j2 < 4; j2++) {
      if (j1 == j2) continue;
      for (int j3 = 1; j3 < 4; j3++) {
        if (j1 == j3 || j2 == j3) continue;
        int k[4] = {i[0], i[j1], i[j2], i[j3]};
        b = b || (isrect2(x, y, k) && issquare2(x, y, k));
      }
    }
  }
  return b;
}
int main() {
  int x[8], y[8];
  for (int i = 0; i < 8; i++) {
    scanf("%d %d", &x[i], &y[i]);
  }
  for (int i1 = 0; i1 < 8; i1++) {
    for (int i2 = i1 + 1; i2 < 8; i2++) {
      for (int i3 = i2 + 1; i3 < 8; i3++) {
        for (int i4 = i3 + 1; i4 < 8; i4++) {
          int j[4];
          int k = 0;
          for (int i = 0; i < 8; i++) {
            if (i != i1 && i != i2 && i != i3 && i != i4) j[k++] = i;
          }
          int l[4] = {i1, i2, i3, i4};
          if (isrect(x, y, l) && isrect(x, y, j)) {
            if (issquare(x, y, l)) {
              printf("YES\n");
              printf("%d %d %d %d\n", i1 + 1, i2 + 1, i3 + 1, i4 + 1);
              printf("%d %d %d %d\n", j[0] + 1, j[1] + 1, j[2] + 1, j[3] + 1);
              return 0;
            } else if (issquare(x, y, j)) {
              printf("YES\n");
              printf("%d %d %d %d\n", j[0] + 1, j[1] + 1, j[2] + 1, j[3] + 1);
              printf("%d %d %d %d\n", i1 + 1, i2 + 1, i3 + 1, i4 + 1);
              return 0;
            }
          }
        }
      }
    }
  }
  printf("NO\n");
}