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;
long long n;
long long m;
long long t;
void solve() {}
struct point {
  long long x, y;
};
bool isSquare(point a, point b, point c, point d) {
  long long dist1 =
      (long long)(b.x - a.x) * (b.x - a.x) + (b.y - a.y) * (b.y - a.y);
  long long dist2 =
      (long long)(b.x - c.x) * (b.x - c.x) + (b.y - c.y) * (b.y - c.y);
  long long dist3 =
      (long long)(c.x - d.x) * (c.x - d.x) + (c.y - d.y) * (c.y - d.y);
  long long dist4 =
      (long long)(a.x - d.x) * (a.x - d.x) + (a.y - d.y) * (a.y - d.y);
  return dist1 == dist2 && dist1 == dist3 && dist1 == dist4;
}
bool noZeroArea(point a, point b, point c, point d) {
  long long dist1 =
      (long long)(b.x - a.x) * (b.x - a.x) + (b.y - a.y) * (b.y - a.y);
  long long dist2 =
      (long long)(b.x - c.x) * (b.x - c.x) + (b.y - c.y) * (b.y - c.y);
  long long dist3 =
      (long long)(c.x - d.x) * (c.x - d.x) + (c.y - d.y) * (c.y - d.y);
  long long dist4 =
      (long long)(a.x - d.x) * (a.x - d.x) + (a.y - d.y) * (a.y - d.y);
  if (dist1 > 0 && dist2 > 0 && dist3 > 0 && dist4 > 0) return true;
  return false;
}
long long IsOrthogonal(point a, point b, point c) {
  return (b.x - a.x) * (b.x - c.x) + (b.y - a.y) * (b.y - c.y) == 0;
}
long long IsRectangle(point a, point b, point c, point d) {
  return IsOrthogonal(a, b, c) && IsOrthogonal(b, c, d) &&
         IsOrthogonal(c, d, a) && noZeroArea(a, b, c, d);
}
long long IsRectangleAnyOrder(point a, point b, point c, point d) {
  return IsRectangle(a, b, c, d) || IsRectangle(b, c, a, d) ||
         IsRectangle(c, a, b, d);
}
long long IsSquareAnyOrder(point a, point b, point c, point d) {
  return (IsRectangle(a, b, c, d) && isSquare(a, b, c, d)) ||
         (IsRectangle(b, c, a, d) && isSquare(b, c, a, d)) ||
         (IsRectangle(c, a, b, d) && isSquare(c, a, b, d));
}
int main() {
  ios_base::sync_with_stdio(false);
  point pt[10];
  for (int i = 1; i <= 8; i++) {
    long long x, y;
    cin >> x >> y;
    pt[i].x = x;
    pt[i].y = y;
  }
  int mtints[] = {1, 2, 3, 4, 5, 6, 7, 8};
  sort(mtints, mtints + 8);
  do {
    if (IsSquareAnyOrder(pt[mtints[0]], pt[mtints[1]], pt[mtints[2]],
                         pt[mtints[3]]) &&
        IsRectangleAnyOrder(pt[mtints[4]], pt[mtints[5]], pt[mtints[6]],
                            pt[mtints[7]])) {
      cout << "YES" << endl;
      cout << mtints[0] << " " << mtints[1] << " " << mtints[2] << " "
           << mtints[3] << endl;
      cout << mtints[4] << " " << mtints[5] << " " << mtints[6] << " "
           << mtints[7] << endl;
      return 0;
    }
  } while (next_permutation(mtints, mtints + 8));
  cout << "NO" << endl;
  return 0;
}