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;
const long long maxn = 1e6 + 1, INF = 1e18 + 1, mod = 1e6 + 3;
long long i, j, k, n, m, answer;
pair<long long, long long> t[8];
long long dist(pair<long long, long long> x0, pair<long long, long long> y0) {
  long long ans = (x0.first - y0.first) * (x0.first - y0.first) +
                  (x0.second - y0.second) * (x0.second - y0.second);
  return ans;
}
bool qv(pair<long long, long long> x0, pair<long long, long long> y0,
        pair<long long, long long> z0, pair<long long, long long> u0) {
  bool ans = 0;
  long long s[6];
  s[0] = dist(x0, y0);
  s[1] = dist(x0, z0);
  s[2] = dist(x0, u0);
  s[3] = dist(y0, z0);
  s[4] = dist(y0, u0);
  s[5] = dist(z0, u0);
  sort(s, s + 6);
  if (s[1] == s[0] && s[0] == s[2] && s[0] == s[3] && s[4] == s[5] &&
      s[4] == s[0] * 2) {
    ans = 1;
  }
  return ans;
}
bool pr(pair<long long, long long> x0, pair<long long, long long> y0,
        pair<long long, long long> z0, pair<long long, long long> u0) {
  bool ans = 0;
  long long s[6], a, b, c, pr1, pr2;
  a = (x0.second - y0.second);
  b = (y0.first - x0.first);
  c = (x0.first * y0.second - y0.first * x0.second);
  pr1 = z0.first * a + z0.second * b + c;
  pr2 = u0.first * a + u0.second * b + c;
  if (pr1 == 0 || pr2 == 0) {
    return 0;
  }
  a = (x0.second - z0.second);
  b = (z0.first - x0.first);
  c = (x0.first * z0.second - z0.first * x0.second);
  pr1 = y0.first * a + y0.second * b + c;
  pr2 = u0.first * a + u0.second * b + c;
  if (pr1 == 0 || pr2 == 0) {
    return 0;
  }
  a = (x0.second - u0.second);
  b = (u0.first - x0.first);
  c = (x0.first * u0.second - u0.first * x0.second);
  pr1 = y0.first * a + y0.second * b + c;
  pr2 = z0.first * a + z0.second * b + c;
  if (pr1 == 0 || pr2 == 0) {
    return 0;
  }
  s[0] = dist(x0, y0);
  s[1] = dist(x0, z0);
  s[2] = dist(x0, u0);
  s[3] = dist(y0, z0);
  s[4] = dist(y0, u0);
  s[5] = dist(z0, u0);
  sort(s, s + 6);
  if (s[0] == s[1] && s[2] == s[3] && s[4] == s[5] && s[0] + s[2] == s[4]) {
    ans = 1;
  }
  return ans;
}
pair<pair<long long, long long>, pair<long long, long long> > f(long long x0,
                                                                long long y0,
                                                                long long z0,
                                                                long long u0) {
  pair<pair<long long, long long>, pair<long long, long long> > ans;
  long long jd = 0;
  for (long long i1 = 0; i1 < 8; ++i1) {
    if (i1 != x0 && i1 != y0 && i1 != z0 && i1 != u0) {
      if (jd == 0) {
        ans.first.first = i1;
      }
      if (jd == 1) {
        ans.first.second = i1;
      }
      if (jd == 2) {
        ans.second.first = i1;
      }
      if (jd == 3) {
        ans.second.second = i1;
      }
      jd++;
    }
  }
  return ans;
}
int main() {
  for (i = 0; i < 8; ++i) {
    cin >> t[i].first >> t[i].second;
  }
  n = 8;
  for (i = 0; i < n; ++i) {
    for (j = 0; j < n; ++j) {
      for (long long i1 = 0; i1 < n; ++i1) {
        for (long long id = 0; id < n; ++id) {
          if (id == i1 || id == i || id == j || i1 == i || i1 == j || i == j) {
            continue;
          }
          pair<pair<long long, long long>, pair<long long, long long> > s0 =
              f(i, j, i1, id);
          if (qv(t[i], t[j], t[i1], t[id]) &&
              pr(t[s0.first.first], t[s0.first.second], t[s0.second.first],
                 t[s0.second.second])) {
            cout << "YES" << endl;
            cout << i + 1 << " " << j + 1 << " " << i1 + 1 << " " << id + 1
                 << endl;
            cout << s0.first.first + 1 << " " << s0.first.second + 1 << " "
                 << s0.second.first + 1 << " " << s0.second.second + 1;
            return 0;
          }
        }
      }
    }
  }
  cout << "NO";
}