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;
typedef struct point {
  int x;
  int y;
} Point;
vector<Point> coord;
vector<int> mask;
vector<int> rect;
vector<int> square;
static void printRect(vector<int>& arr) {
  for (int i = 0; i < arr.size(); ++i) printf("%d ", arr[i] + 1);
  printf("\n");
}
static bool findSquare(Point a, Point b) {
  Point vec = {b.x - a.x, b.y - a.y};
  Point pt_a = {a.x - vec.y, a.y + vec.x};
  Point pt_b = {b.x - vec.y, b.y + vec.x};
  bool isAFound = false;
  bool isBFound = false;
  for (int i = 0; i < coord.size(); ++i) {
    Point pt = coord[i];
    if ((pt.x == pt_a.x) && (pt.y == pt_a.y) && (mask[i] == 0)) {
      square.push_back(i);
      mask[i] = 1;
      isAFound = true;
    } else if ((pt.x == pt_b.x) && (pt.y == pt_b.y) && (mask[i] == 0)) {
      square.push_back(i);
      mask[i] = 1;
      isBFound = true;
    }
  }
  return (isAFound && isBFound);
}
static bool checkRect(vector<Point>& co) {
  for (int i = 0; i < co.size(); ++i) {
    for (int j = i + 1; j < co.size(); ++j) {
      int mk[4] = {0, 0, 0, 0};
      Point a = co[i];
      Point b = co[j];
      Point vec = {a.y - b.y, b.x - a.x};
      mk[i] = 1;
      mk[j] = 1;
      bool isMag = false;
      Point st;
      for (int k = 0; k < co.size(); ++k) {
        if (mk[k] == 0) {
          Point c = co[k];
          Point c_a = {c.x - a.x, c.y - a.y};
          float rata = (float)c_a.x * vec.y;
          float ratb = (float)c_a.y * vec.x;
          if ((fabs(rata - ratb) < 0.0001f)) {
            if (!isMag || (c_a.x == st.x && c_a.y == st.y)) {
              isMag = true;
              st.x = c_a.x;
              st.y = c_a.y;
              mk[k] = 1;
              continue;
            }
          }
          Point c_b = {c.x - b.x, c.y - b.y};
          rata = (float)c_b.x * vec.y;
          ratb = (float)c_b.y * vec.x;
          if ((fabs(rata - ratb) < 0.0001f)) {
            if (!isMag || (c_b.x == st.x && c_b.y == st.y)) {
              isMag = true;
              st.x = c_b.x;
              st.y = c_b.y;
              mk[k] = 1;
              continue;
            }
          }
        }
      }
      if ((mk[0] == 1) && (mk[1] == 1) && (mk[2] == 1) && (mk[3] == 1)) {
        return true;
      }
    }
  }
  return false;
}
static bool isRect() {
  vector<Point> candidate;
  for (int i = 0; i < coord.size(); ++i)
    if (mask[i] == 0) {
      candidate.push_back(coord[i]);
      rect.push_back(i);
    }
  return checkRect(candidate);
}
static void clearMask() {
  for (int i = 0; i < mask.size(); ++i) mask[i] = 0;
}
static bool search() {
  for (int i = 0; i < coord.size(); ++i) {
    for (int j = i + 1; j < coord.size(); ++j) {
      square.push_back(i);
      square.push_back(j);
      mask[i] = 1;
      mask[j] = 1;
      if (findSquare(coord[i], coord[j])) {
        if (isRect()) {
          return true;
        }
      }
      rect.clear();
      square.clear();
      clearMask();
    }
  }
  return false;
}
int main() {
  int n = 8;
  mask.resize(n);
  clearMask();
  while (n-- > 0) {
    int x = 0;
    int y = 0;
    scanf("%d %d", &x, &y);
    Point pt = {x, y};
    coord.push_back(pt);
  }
  if (search()) {
    printf("YES\n");
    printRect(square);
    printRect(rect);
  } else
    printf("NO\n");
  return 0;
}