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;
int main() {
  int x[8] = {0}, y[8] = {0}, sqr[4] = {0}, rect[4] = {0}, used[8] = {0};
  for (int i = 0; i < 8; ++i) scanf("%d %d", &x[i], &y[i]);
  for (int i = 0; i < 8; ++i) {
    used[i] = 1;
    for (int j = 0; j < 8; ++j) {
      if (i == j) continue;
      used[j] = 1;
      for (int k = 0; k < 8; ++k) {
        if (k == i || k == j) continue;
        int x1 = x[j] - x[i], x2 = x[k] - x[i], y1 = y[j] - y[i],
            y2 = y[k] - y[i];
        if (x1 * x2 + y1 * y2) continue;
        used[k] = 1;
        for (int l = 0; l < 8; ++l) {
          if (l == k || l == i || l == j) continue;
          if (i == 0 && j == 1 && k == 7 && l == 5) i = 0;
          int x1 = x[j] - x[l], x2 = x[k] - x[l], y1 = y[j] - y[l],
              y2 = y[k] - y[l];
          if (x1 * x2 + y1 * y2) continue;
          used[l] = 1;
          bool b = 0;
          if (x1 * x1 + y1 * y1 == x2 * x2 + y2 * y2) {
            b = 1;
            sqr[0] = i + 1;
            sqr[1] = j + 1;
            sqr[2] = k + 1;
            sqr[3] = l + 1;
          } else {
            rect[0] = i + 1;
            rect[1] = j + 1;
            rect[2] = k + 1;
            rect[3] = l + 1;
          }
          int ar[4], count = 0;
          for (int m = 0; m < 8; ++m) {
            if (used[m]) continue;
            ar[count++] = m;
          }
          int x3 = x[ar[1]] - x[ar[3]], x4 = x[ar[2]] - x[ar[3]],
              y3 = y[ar[1]] - y[ar[3]], y4 = y[ar[2]] - y[ar[3]];
          x1 = x[ar[1]] - x[ar[0]], x2 = x[ar[2]] - x[ar[0]],
          y1 = y[ar[1]] - y[ar[0]], y2 = y[ar[2]] - y[ar[0]];
          int x5 = x[ar[0]] - x[ar[2]], x6 = x[ar[1]] - x[ar[2]],
              y5 = y[ar[0]] - y[ar[2]], y6 = y[ar[1]] - y[ar[2]];
          int x7 = x[ar[0]] - x[ar[3]], x8 = x[ar[1]] - x[ar[3]],
              y7 = y[ar[0]] - y[ar[3]], y8 = y[ar[1]] - y[ar[3]];
          int x9 = x[ar[0]] - x[ar[3]], x0 = x[ar[2]] - x[ar[3]],
              y9 = y[ar[0]] - y[ar[3]], y0 = y[ar[2]] - y[ar[3]];
          int x91 = x[ar[0]] - x[ar[1]], x01 = x[ar[2]] - x[ar[1]],
              y91 = y[ar[0]] - y[ar[1]], y01 = y[ar[2]] - y[ar[1]];
          if ((x1 * x2 + y1 * y2 || x3 * x4 + y3 * y4) &&
              (x5 * x6 + y5 * y6 || x7 * x8 + y7 * y8) &&
              (x9 * x0 + y9 * y0 || x91 * x01 + y91 * y01)) {
            used[l] = 0;
            continue;
          }
          if (b) {
            printf("YES\n%d %d %d %d\n%d %d %d %d", i + 1, j + 1, k + 1, l + 1,
                   ar[0] + 1, 1 + ar[1], 1 + ar[2], 1 + ar[3]);
            return 0;
          }
          if (x1 * x1 + y1 * y1 == x2 * x2 + y2 * y2) {
            printf("YES\n%d %d %d %d\n%d %d %d %d", 1 + ar[0], ar[1] + 1,
                   ar[2] + 1, ar[3] + 1, i + 1, j + 1, k + 1, l + 1);
            return 0;
          }
          if (x5 * x5 + y5 * y5 == x6 * x6 + y6 * y6) {
            printf("YES\n%d %d %d %d\n%d %d %d %d", 1 + ar[0], ar[1] + 1,
                   ar[2] + 1, ar[3] + 1, i + 1, j + 1, k + 1, l + 1);
            return 0;
          }
          used[l] = 0;
        }
        used[k] = 0;
      }
      used[j] = 0;
    }
    used[i] = 0;
  }
  printf("NO");
  return 0;
}