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 vec {
  int x, y;
  int start, end;
  vector<int> coliniarn;
  vec(int x = 0, int y = 0, int p1 = 0, int p2 = 0)
      : x(x), y(y), start(p1), end(p2) {}
};
int vect(vec &a, vec &b) { return (a.x * b.y - a.y * b.x); }
int scalar(vec &a, vec &b) { return (a.x * b.x + a.y * b.y); }
int length(vec &a) { return (a.x * a.x + a.y * a.y); }
int main() {
  pair<int, int> v[8];
  for (int i = 0; i < 8; i++) {
    cin >> v[i].first >> v[i].second;
  }
  vector<vec> a;
  for (int i = 0; i < 8; i++)
    for (int j = i + 1; j < 8; j++) {
      vec e(v[i].first - v[j].first, v[i].second - v[j].second, i, j);
      a.push_back(e);
    }
  vector<int> square;
  vector<int> rectangle;
  vector<bool> used(8);
  bool found1 = false;
  for (int i = 0; i < a.size() && !found1; i++) {
    for (int j = 0; j < a.size() && !found1; j++) {
      if (i != j) {
        if (!vect(a[i], a[j]) && (length(a[i]) == length(a[j]))) {
          vec t1(v[a[i].start].first - v[a[j].start].first,
                 v[a[i].start].second - v[a[j].start].second, a[i].start,
                 a[j].start);
          vec t2(v[a[i].end].first - v[a[j].end].first,
                 v[a[i].end].second - v[a[j].end].second, a[i].end, a[j].end);
          if (!scalar(a[i], t1) && !scalar(a[i], t2) && !vect(t1, t2) &&
              (length(t1) == length(t2)) && (length(t1) == length(a[i]))) {
            found1 = true;
            used[a[i].start] = true;
            used[a[j].start] = true;
            used[a[i].end] = true;
            used[a[j].end] = true;
            break;
          }
          vec t3(v[a[i].start].first - v[a[j].end].first,
                 v[a[i].start].second - v[a[j].end].second, a[i].start,
                 a[j].end);
          vec t4(v[a[i].end].first - v[a[j].start].first,
                 v[a[i].end].second - v[a[j].start].second, a[i].end,
                 a[j].start);
          if (!scalar(a[i], t3) && !scalar(a[i], t4) && !vect(t3, t4) &&
              (length(t3) == length(t4)) && (length(t3) == length(a[i]))) {
            found1 = true;
            used[a[i].start] = true;
            used[a[j].start] = true;
            used[a[i].end] = true;
            used[a[j].end] = true;
            break;
          }
        }
      }
    }
  }
  if (!found1) {
    cout << "NO" << endl;
    return 0;
  } else {
    found1 = false;
    for (int i = 0; i < a.size() && !found1; i++) {
      for (int j = 0; j < a.size() && !found1; j++) {
        if (i != j) {
          if (!vect(a[i], a[j]) && (length(a[i]) == length(a[j]))) {
            if (!used[a[i].start] && !used[a[j].start] && !used[a[i].end] &&
                !used[a[j].end]) {
              vec t1(v[a[i].start].first - v[a[j].start].first,
                     v[a[i].start].second - v[a[j].start].second, a[i].start,
                     a[j].start);
              vec t2(v[a[i].end].first - v[a[j].end].first,
                     v[a[i].end].second - v[a[j].end].second, a[i].end,
                     a[j].end);
              if (!scalar(a[i], t1) && !scalar(a[i], t2) && !vect(t1, t2) &&
                  (length(t1) == length(t2))) {
                found1 = true;
                used[a[i].start] = false;
                used[a[j].start] = false;
                used[a[i].end] = false;
                used[a[j].end] = false;
              }
              vec t3(v[a[i].start].first - v[a[j].end].first,
                     v[a[i].start].second - v[a[j].end].second, a[i].start,
                     a[j].end);
              vec t4(v[a[i].end].first - v[a[j].start].first,
                     v[a[i].end].second - v[a[j].start].second, a[i].end,
                     a[j].start);
              if (!scalar(a[i], t3) && !scalar(a[i], t4) && !vect(t3, t4) &&
                  (length(t3) == length(t4))) {
                found1 = true;
                used[a[i].start] = false;
                used[a[j].start] = false;
                used[a[i].end] = false;
                used[a[j].end] = false;
              }
            }
          }
        }
      }
    }
    if (!found1) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < 8; i++) {
    if (used[i]) cout << i + 1 << " ";
  }
  cout << endl;
  for (int i = 0; i < 8; i++) {
    if (!used[i]) cout << i + 1 << " ";
  }
  cout << endl;
  return 0;
}