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;
class Point {
 public:
  int x;
  int y;
  Point(int x = 0, int y = 0) : x(x), y(y) {}
  friend Point operator-(Point a, Point b) {
    return Point(b.x - a.x, b.y - a.y);
  }
};
int getBit(int mask, int num) { return ((mask & (1 << num)) ? 1 : 0); }
int innerProduct(Point a, Point b) { return a.x * b.x + a.y * b.y; }
int sqr(int x) { return x * x; }
int squareDist(Point a, Point b) { return sqr(a.x - b.x) + sqr(b.y - a.y); }
bool checkEdges(vector<Point> figure) {
  figure.push_back(figure.front());
  figure.push_back(*(figure.begin() + 1));
  for (int i = 0; i + 2 < figure.size(); ++i)
    if (innerProduct(figure[i + 1] - figure[i],
                     figure[i + 2] - figure[i + 1]) != 0)
      return false;
  return true;
}
bool checkEdgesEquality(vector<Point> figure) {
  figure.push_back(figure.front());
  for (int i = 0; i + 2 < figure.size(); ++i)
    if (squareDist(figure[i], figure[i + 1]) !=
        squareDist(figure[i + 1], figure[i + 2]))
      return false;
  return true;
}
bool checkRectangleEdges(vector<Point> figure) {
  figure.push_back(figure.front());
  if (squareDist(figure[0], figure[1]) == squareDist(figure[2], figure[3]) &&
      squareDist(figure[1], figure[2]) == squareDist(figure[3], figure[4]))
    return true;
  else
    return false;
}
bool checkSquare(vector<Point> square) {
  vector<int> sm;
  sm.push_back(0);
  sm.push_back(1);
  sm.push_back(2);
  sm.push_back(3);
  do {
    vector<Point> sq;
    for (int i = 0; i < 4; ++i) sq.push_back(square[sm[i]]);
    if (checkEdges(sq) && checkEdgesEquality(sq)) return true;
  } while (next_permutation(sm.begin(), sm.end()));
  return false;
}
bool checkRectangle(vector<Point> rectangle) {
  vector<int> sm;
  sm.push_back(0);
  sm.push_back(1);
  sm.push_back(2);
  sm.push_back(3);
  do {
    vector<Point> sq;
    for (int i = 0; i < 4; ++i) sq.push_back(rectangle[sm[i]]);
    if (checkEdges(sq) && checkRectangleEdges(sq)) return true;
  } while (next_permutation(sm.begin(), sm.end()));
  return false;
}
bool check(vector<Point> square, vector<Point> rectangle) {
  if (checkSquare(square) && checkRectangle(rectangle)) return true;
  return false;
}
int main() {
  vector<Point> v;
  int a, b;
  for (int i = 0; i < 8; ++i) {
    cin >> a >> b;
    v.push_back(Point(a, b));
  }
  int i = 0;
  while (i < 1 << 8) {
    vector<Point> square, rectangle;
    vector<int> resSquare, resRectangle;
    for (int j = 0; j < 8; ++j) {
      if (getBit(i, j))
        square.push_back(v[j]);
      else
        rectangle.push_back(v[j]);
    }
    if (square.size() == 4 && rectangle.size() == 4 &&
        check(square, rectangle)) {
      for (int j = 0; j < 8; ++j) {
        if (getBit(i, j))
          resSquare.push_back(j);
        else
          resRectangle.push_back(j);
      }
      cout << "YES" << endl;
      for (int j = 0; j < 4; ++j) cout << resSquare[j] + 1 << " ";
      cout << endl;
      for (int j = 0; j < 4; ++j) cout << resRectangle[j] + 1 << " ";
      return 0;
    }
    ++i;
  }
  cout << "NO";
  return 0;
}