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>
double const PI = 4 * atan(1.0);
using namespace std;
struct Point {
  int x, y;
  Point(){};
  Point(int _x, int _y) {
    x = _x;
    y = _y;
  }
};
Point O;
int ccw(Point A, Point B, Point C) {
  long long dx1 = B.x - A.x, dy1 = B.y - A.y;
  long long dx2 = C.x - A.x, dy2 = C.y - A.y;
  long long ret = dx1 * dy2 - dx2 * dy1;
  if (ret == 0) return 0;
  return ret < 0 ? -1 : +1;
}
long long sqr(int x) { return (long long)x * x; }
long long sqrdist(Point P1, Point P2) {
  return sqr(P1.x - P2.x) + sqr(P1.y - P2.y);
}
bool nearer(Point P1, Point P2) { return sqrdist(O, P1) < sqrdist(O, P2); }
bool cmp(Point P1, Point P2) {
  int c = ccw(O, P1, P2);
  if (c != 0) return c > 0;
  return nearer(P1, P2);
}
void graham(Point a[], int &n) {
  int imin = 0;
  for (int i = 1; i < n; ++i) {
    if (a[imin].y > a[i].y)
      imin = i;
    else if (a[imin].y == a[i].y && a[imin].x > a[i].x)
      imin = i;
  }
  O = a[imin];
  swap(a[0], a[imin]);
  sort(a + 1, a + n, cmp);
  int inow = 1;
  for (int i = 2; i < n; ++i) {
    while (inow > 0 && ccw(a[i], a[inow], a[inow - 1]) >= 0) --inow;
    ++inow;
    swap(a[inow], a[i]);
  }
  n = inow + 1;
}
Point P[10], P1[10], P2[10];
int r[10];
int dientich(Point p[]) {
  p[4] = p[0];
  int res = 0;
  for (int i = 0; i < 4; i++)
    res += (p[i].x * p[i + 1].y - p[i].y * p[i + 1].x);
  return res;
}
bool checkchunhat(Point p[]) {
  p[4] = p[0];
  for (int i = 1; i <= 3; i++)
    if ((p[i].x - p[i - 1].x) * (p[i].x - p[i + 1].x) +
            (p[i].y - p[i - 1].y) * (p[i].y - p[i + 1].y) !=
        0)
      return false;
  if (dientich(p) == 0) return false;
  return true;
}
bool checkvuong(Point p[]) {
  if (!checkchunhat(p)) return false;
  if (sqrdist(p[0], p[1]) != sqrdist(p[1], p[2])) return false;
  return true;
}
int main() {
  for (int i = 0; i < 8; i++) scanf("%d %d", &P[i].x, &P[i].y);
  for (int i = 0; i < 8; i++)
    for (int j = i + 1; j < 8; j++)
      for (int k = j + 1; k < 8; k++)
        for (int t = k + 1; t < 8; t++) {
          P1[0] = P[i];
          P1[1] = P[j];
          P1[2] = P[k];
          P1[3] = P[t];
          int run = 0, n = 4, m = 4;
          for (int u = 0; u < 8; u++)
            if (u != i && u != j && u != k && u != t) {
              r[run++] = u;
              P2[run - 1] = P[u];
            }
          graham(P1, n);
          graham(P2, m);
          if (n < 4 || m < 4) continue;
          if (checkvuong(P1) && checkchunhat(P2)) {
            printf("YES\n");
            printf("%d %d %d %d\n", i + 1, j + 1, k + 1, t + 1);
            for (int i = 0; i < 4; i++) printf("%d ", r[i] + 1);
            return 0;
          }
        }
  printf("NO");
}