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>
#pragma GCC optimize("O3")
using namespace std;
const int N = 1e5 + 5;
int x[10], y[10];
long double dot(complex<long double> a, complex<long double> b) {
  return (conj(a) * b).real();
}
bool rectangle(vector<int> &v) {
  sort(v.begin(), v.end());
  int cnt = 0;
  do {
    complex<long double> a(x[v[0]], y[v[0]]);
    complex<long double> b(x[v[1]], y[v[1]]);
    complex<long double> c(x[v[2]], y[v[2]]);
    if (abs(dot(b - a, c - b)) < 1e-6) cnt++;
  } while (next_permutation(v.begin(), v.end()));
  return cnt == 8;
}
bool square(vector<int> v) {
  if (!rectangle(v)) return false;
  sort(v.begin(), v.end(), [](int i, int j) { return y[i] < y[j]; });
  if (y[v[2]] == y[v[3]] && x[v[2]] < x[v[3]])
    swap(v[2], v[3]);
  else if (y[v[2]] != y[v[3]]) {
    if (x[v[1]] < x[v[2]]) swap(v[1], v[2]);
    swap(v[2], v[3]);
  }
  bool yes = true;
  int difx = (x[v[0]] - x[v[1]]), dify = (y[v[0]] - y[v[1]]);
  int len = difx * difx + dify * dify;
  for (int i = 1; i < 4; i++) {
    difx = (x[v[i]] - x[v[(i + 1) % 4]]), dify = (y[v[i]] - y[v[(i + 1) % 4]]);
    int len1 = difx * difx + dify * dify;
    yes &= (len == len1);
  }
  return yes;
}
void solve(int i, vector<int> v1, vector<int> v2) {
  if (i == 9) {
    if (square(v1) && rectangle(v2)) {
      cout << "YES\n";
      for (auto &j : v1) cout << j << " ";
      cout << '\n';
      for (auto &j : v2) cout << j << " ";
      exit(0);
    }
  }
  if (v1.size() < 4) {
    v1.push_back(i);
    solve(i + 1, v1, v2);
    v1.pop_back();
  }
  if (v2.size() < 4) {
    v2.push_back(i);
    solve(i + 1, v1, v2);
    v2.pop_back();
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 1; i <= 8; i++) cin >> x[i] >> y[i];
  solve(1, vector<int>(), vector<int>());
  cout << "NO";
  return 0;
}