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;
  void get() { scanf("%d%d", &x, &y); }
  bool friend operator<(Point a, Point b) {
    if (a.x != b.x) return a.x < b.x;
    return a.y < b.y;
  }
};
struct Line {
  Point s, e;
  Line() {}
  Line(Point ss, Point ee) {
    s = ss;
    e = ee;
  }
};
Point pnt[80];
void get_data() {
  int i;
  for (i = 0; i < 8; i++) pnt[i].get();
}
int sq[40], rt[40];
Point s[40], r[40];
int get_dis(Point a, Point b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
int cc(Point a, Line b) {
  int sx, sy, ex, ey;
  sx = b.s.x - a.x;
  sy = b.s.y - a.y;
  ex = b.e.x - a.x;
  ey = b.e.y - a.y;
  int temp = sx * ey - sy * ex;
  if (temp > 0) return 1;
  if (temp < 0) return -1;
  return 0;
}
int vcc(Point a, Line b) {
  int sx, sy, ex, ey;
  sx = b.s.x - a.x;
  sy = b.s.y - a.y;
  ex = b.e.x - a.x;
  ey = b.e.y - a.y;
  int temp = sx * ey - sy * ex;
  return temp;
}
bool coincide(Line a, Line b) {
  int c[4];
  c[0] = cc(a.s, b);
  c[1] = cc(a.e, b);
  c[2] = cc(b.s, a);
  c[3] = cc(b.e, a);
  if ((c[0] & c[1] & c[2] & c[3]) == 0) return 0;
  return cc(a.s, b) != cc(a.e, b) && cc(b.s, a) != cc(b.e, a);
}
bool init(Point a, Line l[4]) {
  int i, temp = 0;
  for (i = 0; i < 4; i++) temp += vcc(a, l[i]);
  return temp != 0;
}
int aa[4] = {2, 3, 5, 8}, bb[4] = {1, 4, 6, 7};
bool ok() {
  int i, j;
  bool pt = 0;
  for (i = 0; i < 4; i++)
    if (sq[i] != aa[i] - 1) break;
  if (i == 4) pt = 1;
  for (i = 0; i < 4; i++) s[i] = pnt[sq[i]];
  for (i = 0; i < 4; i++) r[i] = pnt[rt[i]];
  sort(s, s + 4);
  sort(r, r + 4);
  int dis[4];
  dis[0] = get_dis(s[0], s[1]);
  dis[1] = get_dis(s[1], s[3]);
  dis[2] = get_dis(s[2], s[3]);
  dis[3] = get_dis(s[2], s[0]);
  if (!dis[0] || !dis[1] || !dis[2] || !dis[3]) return 0;
  if (dis[0] != dis[1] || dis[0] != dis[2] || dis[0] != dis[3]) return 0;
  if ((s[1].x - s[0].x) * (s[2].x - s[0].x) !=
      -(s[2].y - s[0].y) * (s[1].y - s[0].y))
    return 0;
  if ((s[0].x - s[1].x) * (s[3].x - s[1].x) !=
      -(s[3].y - s[1].y) * (s[0].y - s[1].y))
    return 0;
  if ((s[1].x - s[3].x) * (s[2].x - s[3].x) !=
      -(s[2].y - s[3].y) * (s[1].y - s[3].y))
    return 0;
  if ((s[0].x - s[2].x) * (s[3].x - s[2].x) !=
      -(s[3].y - s[2].y) * (s[0].y - s[2].y))
    return 0;
  dis[0] = get_dis(r[0], r[1]);
  dis[1] = get_dis(r[1], r[3]);
  dis[2] = get_dis(r[2], r[3]);
  dis[3] = get_dis(r[2], r[0]);
  if (!dis[0] || !dis[1] || !dis[2] || !dis[3]) return 0;
  if (dis[0] != dis[2] || dis[1] != dis[3]) return 0;
  if ((r[1].x - r[0].x) * (r[2].x - r[0].x) !=
      -(r[2].y - r[0].y) * (r[1].y - r[0].y))
    return 0;
  if ((r[0].x - r[1].x) * (r[3].x - r[1].x) !=
      -(r[3].y - r[1].y) * (r[0].y - r[1].y))
    return 0;
  if ((r[1].x - r[3].x) * (r[2].x - r[3].x) !=
      -(r[2].y - r[3].y) * (r[1].y - r[3].y))
    return 0;
  if ((r[0].x - r[2].x) * (r[3].x - r[2].x) !=
      -(r[3].y - r[2].y) * (r[0].y - r[2].y))
    return 0;
  printf("YES\n");
  for (i = 0; i < 4; i++) {
    printf("%d", sq[i] + 1);
    if (i < 3)
      printf(" ");
    else
      printf("\n");
  }
  for (i = 0; i < 4; i++) {
    printf("%d", rt[i] + 1);
    if (i < 3)
      printf(" ");
    else
      printf("\n");
  }
  return 1;
}
bool dfs(int loc, int ch, int cj) {
  if (loc == 8) {
    return ok();
  }
  int i;
  if (ch < 4) {
    sq[ch] = loc;
    if (dfs(loc + 1, ch + 1, cj)) return 1;
  }
  if (cj < 4) {
    rt[cj] = loc;
    if (dfs(loc + 1, ch, cj + 1)) return 1;
  }
  return 0;
}
void run() {
  if (!dfs(0, 0, 0)) printf("NO\n");
}
int main() {
  get_data();
  run();
  return 0;
}