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;
struct Point {
  int x, y;
};
struct line {
  Point p1, p2;
};
int dis(Point p1, Point p2) {
  return (p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y);
}
bool Perpendicular(line l1, line l2) {
  int y1 = l1.p2.y - l1.p1.y;
  int x1 = l1.p2.x - l1.p1.x;
  int y2 = l2.p2.y - l2.p1.y;
  int x2 = l2.p2.x - l2.p1.x;
  return y1 * y2 + x1 * x2 == 0;
}
bool parallel(line l1, line l2) {
  int y1 = l1.p2.y - l1.p1.y;
  int x1 = l1.p2.x - l1.p1.x;
  int y2 = l2.p2.y - l2.p1.y;
  int x2 = l2.p2.x - l2.p1.x;
  return y1 * x2 - y2 * x1 == 0;
}
Point pp[10];
int main() {
  for (int i = 0; i < 8; i++) scanf("%d%d", &pp[i].x, &pp[i].y);
  bool resflag = false;
  int getStatu;
  for (int s = 0; s < 256; s++) {
    int oneCnt = 0;
    for (int i = 0; i < 8; i++)
      if (s & (1 << i)) oneCnt++;
    if (oneCnt != 4) continue;
    Point squ[4], rec[4];
    int squcnt = 0, reccnt = 0;
    for (int i = 0; i < 8; i++) {
      if (s & (1 << i))
        squ[squcnt++] = pp[i];
      else
        rec[reccnt++] = pp[i];
    }
    bool canBeSqu = false;
    Point b;
    for (int i = 0; i < 4; i++) {
      for (int j = i; j < 4; j++)
        if (dis(squ[0], squ[i]) > dis(squ[0], squ[j])) {
          b.x = squ[j].x, b.y = squ[j].y;
          squ[j].x = squ[i].x, squ[j].y = squ[i].y;
          squ[i].x = b.x, squ[i].y = b.y;
        }
    }
    int e1 = dis(squ[0], squ[1]), e2 = dis(squ[0], squ[2]);
    int e3 = dis(squ[3], squ[1]), e4 = dis(squ[3], squ[2]);
    line ls1;
    ls1.p1 = squ[0];
    ls1.p2 = squ[1];
    line ls2;
    ls2.p1 = squ[0];
    ls2.p2 = squ[2];
    if (e1 == e2 && e2 == e3 && e3 == e4 && Perpendicular(ls1, ls2))
      canBeSqu = true;
    bool canBeRec = false;
    for (int i = 0; i < 4; i++) {
      for (int j = i; j < 4; j++)
        if (dis(rec[0], rec[i]) > dis(rec[0], rec[j])) {
          b.x = rec[j].x, b.y = rec[j].y;
          rec[j].x = rec[i].x, rec[j].y = rec[i].y;
          rec[i].x = b.x, rec[i].y = b.y;
        }
    }
    line l1;
    l1.p1 = rec[0];
    l1.p2 = rec[1];
    line l2;
    l2.p1 = rec[0];
    l2.p2 = rec[2];
    line l3;
    l3.p1 = rec[3];
    l3.p2 = rec[1];
    line l4;
    l4.p1 = rec[3];
    l4.p2 = rec[2];
    if (parallel(l1, l4) && parallel(l2, l3) && Perpendicular(l1, l2))
      canBeRec = true;
    if (canBeRec && canBeSqu) {
      resflag = true;
      getStatu = s;
      break;
    }
  }
  if (resflag) {
    printf("YES\n");
    for (int i = 0; i < 8; i++)
      if (getStatu & (1 << i)) printf("%d ", i + 1);
    printf("\n");
    for (int i = 0; i < 8; i++)
      if ((getStatu & (1 << i)) == 0) printf("%d ", i + 1);
    printf("\n");
  } else
    printf("NO\n");
}