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;
template <typename T>
string tostr(const T& t) {
  ostringstream os;
  os << t;
  return os.str();
}
typedef struct {
  int ndx;
  int x, y;
} typept;
bool overlap(int RectA_X1, int RectA_X2, int RectB_X1, int RectB_X2,
             int RectA_Y1, int RectA_Y2, int RectB_Y1, int RectB_Y2) {
  return !(RectA_X1 < RectB_X2 && RectA_X2 > RectB_X1 && RectA_Y1 < RectB_Y2 &&
           RectA_Y2 > RectB_Y1);
}
inline double getdist(double x1, double y1, double x2, double y2) {
  double d1 = x1 - x2;
  double d2 = y1 - y2;
  return sqrt(d1 * d1 + d2 * d2);
}
bool check(typept pt0, typept pt1, typept pt2, typept pt3, bool issquare) {
  double side0 = getdist(pt0.x, pt0.y, pt3.x, pt3.y);
  double side1 = getdist(pt0.x, pt0.y, pt1.x, pt1.y);
  double side2 = getdist(pt1.x, pt1.y, pt2.x, pt2.y);
  double side3 = getdist(pt2.x, pt2.y, pt3.x, pt3.y);
  if (issquare) {
    if (fabs(side0 - side1) > 1e-9 || fabs(side0 - side2) > 1e-9 ||
        fabs(side0 - side3) > 1e-9)
      return false;
  } else {
    if (fabs(side0 - side2) > 1e-9 || fabs(side1 - side3) > 1e-9) return false;
  }
  double diag1 = getdist(pt0.x, pt0.y, pt2.x, pt2.y);
  double diag2 = getdist(pt1.x, pt1.y, pt3.x, pt3.y);
  if (fabs(diag1 - diag2) > 1e-9) return false;
  double mid_x1 = (double)(pt0.x + pt2.x) / 2.0;
  double mid_y1 = (double)(pt0.y + pt2.y) / 2.0;
  double mid_x2 = (double)(pt1.x + pt3.x) / 2.0;
  double mid_y2 = (double)(pt1.y + pt3.y) / 2.0;
  if (fabs(mid_x1 - mid_x2) > 1e-9 || fabs(mid_y1 - mid_y2) > 1e-9)
    return false;
  return true;
}
int main() {
  bool success = false;
  vector<typept> pts;
  for (int i = (int)(0); i <= (int)(8 - 1); ++i) {
    typept pt;
    pt.ndx = i + 1;
    cin >> pt.x >> pt.y;
    pts.push_back(pt);
  }
  for (int mask = (int)(0); mask <= (int)((1 << 8) - 1); ++mask) {
    vector<typept> set1, set2;
    for (int i = (int)(0); i <= (int)(8 - 1); ++i) {
      if (((1 << i) & mask))
        set1.push_back(pts[i]);
      else
        set2.push_back(pts[i]);
    }
    if ((int)set1.size() != 4 && (int)set2.size() != 4) continue;
    vector<int> perm1, perm2;
    for (int i = (int)(0); i <= (int)(4 - 1); ++i) {
      perm1.push_back(i);
      perm2.push_back(i);
    }
    vector<typept> ans1;
    vector<typept> ans2;
    do {
      typept pt0, pt1, pt2, pt3;
      pt0 = set1[perm1[0]];
      pt1 = set1[perm1[1]];
      pt2 = set1[perm1[2]];
      pt3 = set1[perm1[3]];
      if (check(pt0, pt1, pt2, pt3, true)) {
        ans1.push_back(pt0);
        ans1.push_back(pt1);
        ans1.push_back(pt2);
        ans1.push_back(pt3);
        break;
      }
    } while (next_permutation((perm1).begin(), (perm1).end()));
    if (ans1.empty()) continue;
    do {
      typept pt0, pt1, pt2, pt3;
      pt0 = set2[perm2[0]];
      pt1 = set2[perm2[1]];
      pt2 = set2[perm2[2]];
      pt3 = set2[perm2[3]];
      if (check(pt0, pt1, pt2, pt3, false)) {
        ans2.push_back(pt0);
        ans2.push_back(pt1);
        ans2.push_back(pt2);
        ans2.push_back(pt3);
        break;
      }
    } while (next_permutation((perm2).begin(), (perm2).end()));
    if (!ans1.empty() && !ans2.empty()) {
      cout << "YES" << endl;
      for (int i = (int)(0); i <= (int)((int)ans1.size() - 1); ++i)
        cout << ans1[i].ndx << " ";
      cout << endl;
      for (int i = (int)(0); i <= (int)((int)ans2.size() - 1); ++i)
        cout << ans2[i].ndx << " ";
      cout << endl;
      success = true;
      break;
    }
  }
  if (!success) cout << "NO" << endl;
  return 0;
}