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("Ofast,unroll-loops,no-stack-protector")
using namespace std;
using lli = long long;
using ld = long double;
using ii = pair<int, int>;
using vi = vector<int>;
int sgn(ld x) { return x > 0 ? 1 : (x < 0 ? -1 : 0); }
const ld eps = 1e-4;
struct P {
  ld x, y;
  explicit P(ld x = 0, ld y = 0) : x(x), y(y) {}
  P operator+(const P &p) const { return P(x + p.x, y + p.y); }
  P operator-(const P &p) const { return P(x - p.x, y - p.y); }
  P operator*(ld k) const { return P(x * k, y * k); }
  P operator/(ld k) const { return P(x / k, y / k); }
  ld dot(const P &p) const { return x * p.x + y * p.y; }
  ld cross(const P &p) const { return x * p.y - y * p.x; }
  ld norm() const { return x * x + y * y; }
  ld length() const { return sqrtl(norm()); }
  ld angle() { return atan2(y, x); }
  P perp() const { return P(-y, x); }
  P unit() const { return (*this) / length(); }
  P rotate(ld angle) const {
    return P(x * cos(angle) - y * sin(angle), x * sin(angle) + y * cos(angle));
  }
  bool operator==(const P &p) const {
    return abs((x) - (p.x)) <= eps && abs((y) - (p.y)) <= eps;
  }
  bool operator!=(const P &p) const {
    return !abs((x) - (p.x)) <= eps || !abs((y) - (p.y)) <= eps;
  }
  friend ostream &operator<<(ostream &os, const P &p) {
    return os << "(" << p.x << ", " << p.y << ")";
  }
  friend istream &operator>>(istream &is, P &p) { return cin >> p.x >> p.y; }
};
P pts[10];
vi order(8);
bool parallel(P a, P b) { return abs((a.cross(b)) - (0)) <= eps; }
bool pointInSegment(P a, P b, P p) {
  return abs(((b - a).cross(p - a)) - (0)) <= eps &&
         ((a - p).dot(b - p)) - (0) <= eps;
}
bool checkAngles(int l, int r) {
  vector<P> fig = {pts[order[l]], pts[order[l + 1]], pts[order[l + 3]],
                   pts[order[l + 2]]};
  ;
  for (auto i = (0) - ((0) > (4)); i != 4 - ((0) > (4));
       i += 1 - 2 * ((0) > (4))) {
    P prev = fig[(i + 3) % 4];
    P cur = fig[i];
    P nxt = fig[(i + 1) % 4];
    ;
    ;
    if (!abs(((prev - cur).dot(nxt - cur)) - (0)) <= eps) return 0;
    ;
  }
  return 1;
}
struct Order {
  bool operator()(const ld &a, const ld &b) const { return (a) - (b) < -eps; }
};
bool square() {
  P a = pts[order[0]], b = pts[order[1]], c = pts[order[2]], d = pts[order[3]];
  P ab = b - a, ac = c - a, cd = d - c, bd = d - b;
  set<ld, Order> st = {ab.norm(), ac.norm(), cd.norm(), bd.norm()};
  if (int(st.size()) != 1) return 0;
  if (!parallel(ab, cd) || !parallel(ac, bd)) return 0;
  if (pointInSegment(a, b, c) || pointInSegment(a, b, d)) return 0;
  if (pointInSegment(c, d, a) || pointInSegment(c, d, b)) return 0;
  if (pointInSegment(a, c, b) || pointInSegment(a, c, d)) return 0;
  if (pointInSegment(b, d, a) || pointInSegment(b, d, c)) return 0;
  return checkAngles(0, 3);
}
bool rectangle() {
  P a = pts[order[4]], b = pts[order[5]], c = pts[order[6]], d = pts[order[7]];
  P ab = b - a, ac = c - a, cd = d - c, bd = d - b;
  set<ld, Order> st = {ab.norm(), ac.norm(), cd.norm(), bd.norm()};
  if (int(st.size()) == 1 || int(st.size()) == 2) {
    if (!parallel(ab, cd) || !parallel(ac, bd)) return 0;
    if (pointInSegment(a, b, c) || pointInSegment(a, b, d)) return 0;
    if (pointInSegment(c, d, a) || pointInSegment(c, d, b)) return 0;
    if (pointInSegment(a, c, b) || pointInSegment(a, c, d)) return 0;
    if (pointInSegment(b, d, a) || pointInSegment(b, d, c)) return 0;
    return checkAngles(4, 7);
  } else {
    return 0;
  }
}
bool can() {
  ;
  return square() && rectangle();
}
int main() {
  cin.tie(0)->sync_with_stdio(0), cout.tie(0);
  for (auto i = (1) - ((1) > (9)); i != 9 - ((1) > (9));
       i += 1 - 2 * ((1) > (9)))
    cin >> pts[i];
  iota(begin(order), end(order), 1);
  do {
    if (can()) {
      cout << "YES\n";
      for (auto i = (0) - ((0) > (8)); i != 8 - ((0) > (8));
           i += 1 - 2 * ((0) > (8)))
        cout << order[i] << " \n"[i == 3 || i == 7];
      return 0;
    }
  } while (next_permutation(begin(order), end(order)));
  cout << "NO\n";
  return 0;
}