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 double EPS = 1e-10;
double dist(double x1, double y1, double x2, double y2) {
  return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
double dist(pair<double, double>& pa, pair<double, double>& pb) {
  return dist(pa.first, pa.second, pb.first, pb.second);
}
double equals(double val_one, double val_two) {
  return (fabs(val_two - val_one) < EPS);
}
double scalar_product(pair<double, double>& va, pair<double, double>& vb) {
  return (va.first * vb.first + va.second * vb.second);
}
double area(pair<double, double>& va, pair<double, double>& vb) {
  return (sqrt(scalar_product(va, va) * scalar_product(vb, vb) -
               scalar_product(va, vb)));
}
void assign_indices(vector<int>& vec, int n) {
  vec.clear();
  for (int i = 0; i < n; ++i) {
    vec.push_back(i);
  }
}
vector<pair<double, double> > arrange_as_indices(
    vector<pair<double, double> >& points, vector<int>& indices, int beg,
    int end) {
  vector<pair<double, double> > result(end - beg);
  for (int i = 0; i < (end - beg); ++i) {
    result[i] = points[indices[beg + i]];
  }
  return result;
}
pair<double, double> make_vec(pair<double, double>& point_one,
                              pair<double, double>& point_two) {
  pair<double, double> point;
  point.first = point_two.first - point_one.first;
  point.second = point_two.second - point_one.second;
  return point;
}
bool check_poly(vector<pair<double, double> > points) {
  pair<double, double> v1 = make_vec(points[0], points[1]);
  pair<double, double> v2 = make_vec(points[1], points[2]);
  pair<double, double> v3 = make_vec(points[2], points[3]);
  pair<double, double> v4 = make_vec(points[3], points[0]);
  if (!equals(area(v1, v2), 0) && equals(scalar_product(v1, v2), 0) &&
      equals(scalar_product(v2, v3), 0) && equals(scalar_product(v3, v4), 0) &&
      equals(scalar_product(v4, v1), 0)) {
    return true;
  } else {
    return false;
  }
}
bool check_square(vector<pair<double, double> > points) {
  if (check_poly(points) &&
      equals(dist(points[0], points[1]), dist(points[1], points[2])) &&
      equals(dist(points[1], points[2]), dist(points[2], points[3])) &&
      equals(dist(points[2], points[3]), dist(points[3], points[0])) &&
      equals(dist(points[3], points[0]), dist(points[0], points[1]))) {
    return true;
  } else {
    return false;
  }
}
vector<pair<double, double> > check_polygons(
    vector<pair<double, double> >& points) {
  vector<int> indices;
  vector<pair<double, double> > result;
  assign_indices(indices, 8);
  do {
    if (check_square(arrange_as_indices(points, indices, 0, 4)) &&
        check_poly(arrange_as_indices(points, indices, 4, 8))) {
      result = arrange_as_indices(points, indices, 0, 8);
      return result;
    }
  } while (next_permutation(indices.begin(), indices.end()));
  return result;
}
void read_points(vector<pair<double, double> >& points, int n) {
  points.assign(n, pair<double, double>(0, 0));
  double x, y;
  for (int i = 0; i < n; ++i) {
    cin >> x >> y;
    points[i].first = x;
    points[i].second = y;
  }
}
vector<int> restore_points(vector<pair<double, double> > initial,
                           vector<pair<double, double> > result) {
  int n = initial.size();
  vector<int> ans;
  vector<bool> used;
  used.assign(n, false);
  ans.assign(n, 0);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (initial[i] == result[j] && !used[j]) {
        used[j] = true;
        ans[j] = i + 1;
      }
    }
  }
  return ans;
}
void print_answer(vector<int> answer) {
  int sz = answer.size();
  for (int i = 0; i < sz / 2; ++i) {
    cout << answer[i] << " ";
  }
  cout << "\n";
  for (int i = sz / 2; i < sz; ++i) {
    cout << answer[i] << " ";
  }
  cout << "\n";
}
int main() {
  vector<pair<double, double> > points;
  vector<pair<double, double> > check_points;
  vector<pair<double, double> > result;
  bool res_val = true;
  read_points(points, 8);
  check_points = points;
  result = check_polygons(check_points);
  if (result.empty()) {
    res_val = false;
  }
  if (res_val == false) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    print_answer(restore_points(points, result));
  }
  return 0;
}