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;
double m[10], n[10];
bool k[10];
int y[10], z[10], tmp[10], tmq[10];
int cmp(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int cmq(const void *a, const void *b) {
  return *(double *)a > *(double *)b ? 1 : -1;
}
double ss;
bool f(int a, int b, int c, int d) {
  double t[8];
  t[0] = sqrt((m[a] - m[b]) * (m[a] - m[b]) + (n[a] - n[b]) * (n[a] - n[b]));
  t[1] = sqrt((m[a] - m[c]) * (m[a] - m[c]) + (n[a] - n[c]) * (n[a] - n[c]));
  t[2] = sqrt((m[a] - m[d]) * (m[a] - m[d]) + (n[a] - n[d]) * (n[a] - n[d]));
  t[3] = sqrt((m[b] - m[c]) * (m[b] - m[c]) + (n[b] - n[c]) * (n[b] - n[c]));
  t[4] = sqrt((m[b] - m[d]) * (m[b] - m[d]) + (n[b] - n[d]) * (n[b] - n[d]));
  t[5] = sqrt((m[c] - m[d]) * (m[c] - m[d]) + (n[c] - n[d]) * (n[c] - n[d]));
  qsort(t, 6, sizeof(t[0]), cmq);
  if (fabs(t[0] - t[1]) < 0.000000001 && fabs(t[1] - t[2]) < 0.000000001 &&
      fabs(t[2] - t[3]) < 0.000000001) {
    ss = t[0] * t[0];
    if (fabs((m[a] - m[c]) * (m[a] - m[d]) + (n[a] - n[c]) * (n[a] - n[d])) <
        0.000000001)
      return true;
    if (fabs((m[a] - m[b]) * (m[a] - m[d]) + (n[a] - n[b]) * (n[a] - n[d])) <
        0.000000001)
      return true;
    if (fabs((m[a] - m[b]) * (m[a] - m[c]) + (n[a] - n[b]) * (n[a] - n[c])) <
        0.000000001)
      return true;
  }
  return false;
}
bool g(int a, int b, int c, int d) {
  int s;
  double t[8];
  t[0] = sqrt((m[a] - m[b]) * (m[a] - m[b]) + (n[a] - n[b]) * (n[a] - n[b]));
  t[1] = sqrt((m[a] - m[c]) * (m[a] - m[c]) + (n[a] - n[c]) * (n[a] - n[c]));
  t[2] = sqrt((m[a] - m[d]) * (m[a] - m[d]) + (n[a] - n[d]) * (n[a] - n[d]));
  t[3] = sqrt((m[b] - m[c]) * (m[b] - m[c]) + (n[b] - n[c]) * (n[b] - n[c]));
  t[4] = sqrt((m[b] - m[d]) * (m[b] - m[d]) + (n[b] - n[d]) * (n[b] - n[d]));
  t[5] = sqrt((m[c] - m[d]) * (m[c] - m[d]) + (n[c] - n[d]) * (n[c] - n[d]));
  qsort(t, 6, sizeof(t[0]), cmq);
  if (fabs(t[0] - t[1]) < 0.000000001 && fabs(t[2] - t[3]) < 0.000000001 &&
      fabs(t[4] - t[5]) < 0.000000001) {
    s = 0;
    if (fabs((m[a] - m[c]) * (m[a] - m[d]) + (n[a] - n[c]) * (n[a] - n[d])) <
        0.000000001)
      s++;
    if (fabs((m[a] - m[b]) * (m[a] - m[d]) + (n[a] - n[b]) * (n[a] - n[d])) <
        0.000000001)
      s++;
    if (fabs((m[a] - m[b]) * (m[a] - m[c]) + (n[a] - n[b]) * (n[a] - n[c])) <
        0.000000001)
      s++;
    if (s != 1) return false;
    s = 0;
    if (fabs((m[b] - m[a]) * (m[b] - m[c]) + (n[b] - n[a]) * (n[b] - n[c])) <
        0.000000001)
      s++;
    if (fabs((m[b] - m[a]) * (m[b] - m[d]) + (n[b] - n[a]) * (n[b] - n[d])) <
        0.000000001)
      s++;
    if (fabs((m[b] - m[c]) * (m[b] - m[d]) + (n[b] - n[c]) * (n[b] - n[d])) <
        0.000000001)
      s++;
    if (s != 1) return false;
    s = 0;
    if (fabs((m[c] - m[a]) * (m[c] - m[b]) + (n[c] - n[a]) * (n[c] - n[b])) <
        0.000000001)
      s++;
    if (fabs((m[c] - m[a]) * (m[c] - m[d]) + (n[c] - n[a]) * (n[c] - n[d])) <
        0.000000001)
      s++;
    if (fabs((m[c] - m[b]) * (m[c] - m[d]) + (n[c] - n[b]) * (n[c] - n[d])) <
        0.000000001)
      s++;
    if (s != 1) return false;
    s = 0;
    if (fabs((m[d] - m[a]) * (m[d] - m[b]) + (n[d] - n[a]) * (n[d] - n[b])) <
        0.000000001)
      s++;
    if (fabs((m[d] - m[a]) * (m[d] - m[c]) + (n[d] - n[a]) * (n[d] - n[c])) <
        0.000000001)
      s++;
    if (fabs((m[d] - m[b]) * (m[d] - m[c]) + (n[d] - n[b]) * (n[d] - n[c])) <
        0.000000001)
      s++;
    if (s != 1) return false;
    return true;
  }
  return false;
}
int main() {
  int i, j, p, q, t, s, flag = 0;
  double max;
  for (i = 1; i <= 8; i++) scanf("%lf%lf", &m[i], &n[i]);
  for (i = 1; i <= 8; i++) k[i] = 0;
  max = 0;
  for (i = 1; i <= 5; i++) {
    k[i] = 1;
    for (j = i + 1; j <= 6; j++) {
      k[j] = 1;
      for (p = j + 1; p <= 7; p++) {
        k[p] = 1;
        for (q = p + 1; q <= 8; q++) {
          k[q] = 1;
          s = 0;
          for (t = 1; t <= 8; t++)
            if (k[t] == 1) {
              s++;
              y[s] = t;
            }
          s = 0;
          for (t = 1; t <= 8; t++)
            if (k[t] == 0) {
              s++;
              z[s] = t;
            }
          if (f(y[1], y[2], y[3], y[4]) && g(z[1], z[2], z[3], z[4])) {
            flag = 1;
            if (ss > max) {
              tmp[0] = y[1];
              tmp[1] = y[2];
              tmp[2] = y[3];
              tmp[3] = y[4];
              tmq[0] = z[1];
              tmq[1] = z[2];
              tmq[2] = z[3];
              tmq[3] = z[4];
              max = ss;
            }
          }
          k[q] = 0;
        }
        k[p] = 0;
      }
      k[j] = 0;
    }
    k[i] = 0;
  }
  if (flag == 0)
    printf("NO\n");
  else {
    printf("YES\n");
    qsort(tmp, 4, sizeof(tmp[0]), cmp);
    qsort(tmq, 4, sizeof(tmq[0]), cmp);
    printf("%d %d %d %d\n", tmp[0], tmp[1], tmp[2], tmp[3]);
    printf("%d %d %d %d\n", tmq[0], tmq[1], tmq[2], tmq[3]);
  }
  return 0;
}