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;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, -1, 1};
const double EPS = 1e-8;
inline int cmp(double x, double y = 0, double tol = EPS) {
  return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}
struct point {
  double x, y;
  point(double x = 0, double y = 0) : x(x), y(y) {}
  point operator+(point q) { return point(x + q.x, y + q.y); }
  point operator-(point q) { return point(x - q.x, y - q.y); }
  point operator*(double t) { return point(x * t, y * t); }
  point operator/(double t) { return point(x / t, y / t); }
  double operator*(point q) { return x * q.x + y * q.y; }
  double operator%(point q) { return x * q.y - y * q.x; }
  int cmp(point q) const {
    if (int t = ::cmp(x, q.x)) return t;
    return ::cmp(y, q.y);
  }
  bool operator==(point q) const { return cmp(q) == 0; }
  bool operator!=(point q) const { return cmp(q) != 0; }
  bool operator<(point q) const { return cmp(q) < 0; }
  bool operator<=(point q) const { return cmp(q) <= 0; }
  friend ostream& operator<<(ostream& o, point p) {
    return o << "(" << p.x << ", " << p.y << ")";
  }
  static point pivot;
};
point point::pivot;
double abs(point p) { return hypot(p.x, p.y); }
double arg(point p) { return atan2(p.y, p.x); }
int ccw(point p, point q, point r) { return cmp((p - r) % (q - r)); }
double distancia(point a, point b) {
  return sqrt(pow(a.x - b.x, 2.0) + pow(a.y - b.y, 2.0));
}
struct pnt {
  int x, y, id;
  pnt(){};
  pnt(int a, int b, int c) {
    x = a;
    y = b;
    id = c;
  }
  bool operator<(pnt p) const {
    if (x != p.x)
      return (x < p.x);
    else
      return (y < p.y);
  }
};
double angle(point p, point q, point r) {
  point u = p - q, v = r - q;
  return atan2(u % v, u * v);
}
pnt v[8];
const int n = 8;
double dist(pnt a, pnt b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
bool test() {
  set<double> s1, s2;
  s1.insert(dist(v[0], v[3]));
  for (int i = 1; i < 4; ++i) {
    point p1, p2, p3;
    if (i == 1) {
      p1.x = v[3].x;
      p1.y = v[3].y;
    } else {
      p1.x = v[i - 2].x;
      p1.y = v[i - 2].y;
    }
    p2.x = v[i - 1].x;
    p2.y = v[i - 1].y;
    p3.x = v[i].x;
    p3.y = v[i].y;
    if (fabs(angle(p1, p2, p3) - (90 * M_PI / 180)) > EPS) return false;
    s1.insert(dist(v[i], v[i - 1]));
  }
  s2.insert(dist(v[4], v[7]));
  for (int i = 5; i < 8; ++i) {
    point p1, p2, p3;
    if (i == 5) {
      p1.x = v[7].x;
      p1.y = v[7].y;
    } else {
      p1.x = v[i - 2].x;
      p1.y = v[i - 2].y;
    }
    p2.x = v[i - 1].x;
    p2.y = v[i - 1].y;
    p3.x = v[i].x;
    p3.y = v[i].y;
    if (fabs(angle(p1, p2, p3) - (90 * M_PI / 180)) > EPS) return false;
    s2.insert(dist(v[i], v[i - 1]));
  }
  return (s1.size() == 1 && s2.size() <= 2);
}
int main() {
  for (int i = 0; i < n; ++i) {
    int x, y;
    scanf("%d %d", &x, &y);
    v[i] = pnt(x, y, i);
  }
  sort(v, v + n);
  do {
    if (test()) {
      printf("YES\n");
      for (int i = 0; i < 4; ++i) printf("%d ", v[i].id + 1);
      printf("\n");
      for (int i = 4; i < 8; ++i) printf("%d ", v[i].id + 1);
      printf("\n");
      return 0;
    }
  } while (next_permutation(v, v + n));
  printf("NO\n");
  return 0;
}