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 INF = 1000 * 1000 * 1000;
struct point {
  double x, y;
};
point A[10];
double dist(point a, point b) {
  return sqrt((b.x - a.x) * (b.x - a.x) + (b.y - a.y) * (b.y - a.y));
}
double enorm(point vect) { return sqrt(vect.x * vect.x + vect.y * vect.y); }
double scal(point a, point b) { return a.x * b.x + a.y * b.y; }
point norm(point a, point b) {
  point t;
  t.x = b.x - a.x;
  t.y = b.y - a.y;
  return t;
}
bool isquad1(point a, point b, point c, point d) {
  double dab, dbc, dcd, dda;
  dab = sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
  dbc = sqrt((b.x - c.x) * (b.x - c.x) + (b.y - c.y) * (b.y - c.y));
  dcd = sqrt((c.x - d.x) * (c.x - d.x) + (c.y - d.y) * (c.y - d.y));
  dda = sqrt((d.x - a.x) * (d.x - a.x) + (d.y - a.y) * (d.y - a.y));
  if (dab == dbc && dab == dcd && dab == dda) {
    double f_dab, f_abc, f_bcd, f_cda;
    point a1, b1;
    a1 = norm(a, d), b1 = norm(a, b);
    f_dab = scal(a1, b1) / (enorm(a1) * enorm(b1));
    a1 = norm(b, a), b1 = norm(b, c);
    f_abc = scal(a1, b1) / (enorm(a1) * enorm(b1));
    a1 = norm(c, b), b1 = norm(c, d);
    f_bcd = scal(a1, b1) / (enorm(a1) * enorm(b1));
    a1 = norm(d, c), b1 = norm(d, a);
    f_cda = scal(a1, b1) / (enorm(a1) * enorm(b1));
    if (fabs(f_dab + f_abc + f_bcd + f_cda) == 0)
      return true;
    else
      return false;
  }
  return false;
}
bool isquad2(point a, point b, point c, point d) {
  double dab, dbc, dcd, dda;
  dab = sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
  dbc = sqrt((b.x - c.x) * (b.x - c.x) + (b.y - c.y) * (b.y - c.y));
  dcd = sqrt((c.x - d.x) * (c.x - d.x) + (c.y - d.y) * (c.y - d.y));
  dda = sqrt((d.x - a.x) * (d.x - a.x) + (d.y - a.y) * (d.y - a.y));
  if (dab == dcd && dda == dbc) {
    double f_dab, f_abc, f_bcd, f_cda;
    point a1, b1;
    a1 = norm(a, d), b1 = norm(a, b);
    f_dab = scal(a1, b1) / (enorm(a1) * enorm(b1));
    a1 = norm(b, a), b1 = norm(b, c);
    f_abc = scal(a1, b1) / (enorm(a1) * enorm(b1));
    a1 = norm(c, b), b1 = norm(c, d);
    f_bcd = scal(a1, b1) / (enorm(a1) * enorm(b1));
    a1 = norm(d, c), b1 = norm(d, a);
    f_cda = scal(a1, b1) / (enorm(a1) * enorm(b1));
    if (fabs(f_dab + f_abc + f_bcd + f_cda) == 0)
      return true;
    else
      return false;
  }
  return false;
}
long double isleft(pair<double, pair<double, double>> p2,
                   pair<double, pair<double, double>> p1,
                   pair<double, pair<double, double>> p0) {
  long double p2x = p2.second.first, p2y = p2.second.second;
  long double p1x = p1.second.first, p1y = p1.second.second;
  long double p0x = p0.second.first, p0y = p0.second.second;
  return (p1x - p0x) * (p2y - p0y) - (p2x - p0x) * (p1y - p0y);
}
bool ch(point a, point b, point c, point d, bool pr) {
  vector<pair<double, pair<double, double>>> P, Pt;
  vector<pair<double, pair<double, double>>> S;
  vector<point> V;
  V.push_back(a);
  V.push_back(b);
  V.push_back(c);
  V.push_back(d);
  long double tx, ty;
  int ti;
  tx = INF, ty = INF, ti = -1;
  for (int i = 0; i < 4; ++i) {
    double x = V[i].x, y = V[i].y;
    P.push_back(make_pair(-1, make_pair(x, y)));
    if (y < ty) {
      tx = x;
      ty = y;
      ti = i;
    } else {
      if (y == ty && x < tx) {
        tx = x;
        ty = y;
        ti = i;
      }
    }
  }
  for (size_t i = 0; i < P.size(); ++i) {
    long double x = P[i].second.first;
    long double y = P[i].second.second;
    P[i].first = atan2(y - ty, x - tx);
    if (i != ti) Pt.push_back(P[i]);
  }
  S.push_back(P[ti]);
  sort(Pt.begin(), Pt.end());
  S.push_back(Pt[0]);
  size_t i = 0;
  while (i < Pt.size()) {
    int size = (int)S.size();
    if (S.size() >= 2) {
      if (isleft(Pt[i], S[size - 1], S[size - 2]))
        S.push_back(Pt[i]), i++;
      else
        S.pop_back(), size--;
    } else
      S.push_back(Pt[i]), i++;
  }
  if (S.size() == 4) {
    point a1, b1, c1, d1;
    a1.x = S[0].second.first, a1.y = S[0].second.second;
    b1.x = S[1].second.first, b1.y = S[1].second.second;
    c1.x = S[2].second.first, c1.y = S[2].second.second;
    d1.x = S[3].second.first, d1.y = S[3].second.second;
    if (isquad1(a1, b1, c1, d1)) {
      return true;
    }
    if (pr)
      if (isquad2(a1, b1, c1, d1) || isquad2(b1, c1, a1, d1)) return true;
  }
  return false;
}
bool isquad(point a, point b, point c, point d, bool pr) {
  double dab, dbc, dcd, dda;
  dab = sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
  dbc = sqrt((b.x - c.x) * (b.x - c.x) + (b.y - c.y) * (b.y - c.y));
  dcd = sqrt((c.x - d.x) * (c.x - d.x) + (c.y - d.y) * (c.y - d.y));
  dda = sqrt((d.x - a.x) * (d.x - a.x) + (d.y - a.y) * (d.y - a.y));
  bool add = true;
  if (!(scal(norm(a, b), norm(b, c)) == 0 &&
        scal(norm(b, c), norm(c, d)) == 0 && scal(norm(c, d), norm(d, a)) == 0))
    return false;
  if (pr) {
    if (dab == dbc && dab == dcd && dab == dda) {
      return true;
    } else {
      return false;
    }
  }
  return true;
}
void load() {
  double x, y;
  for (int i = 0; i < 8; ++i) {
    cin >> x >> y;
    A[i].x = x, A[i].y = y;
  }
}
vector<int> Q1, Q2;
void solve() {
  for (int i1 = 0; i1 < 8; ++i1)
    for (int i2 = 0; i2 < 8; ++i2)
      for (int i3 = 0; i3 < 8; ++i3)
        for (int i4 = 0; i4 < 8; ++i4) {
          if (i1 != i2 && i1 != i3 && i1 != i4 && i2 != i3 && i2 != i4 &&
              i3 != i4) {
            int key = 0;
            if (isquad(A[i1], A[i2], A[i3], A[i4], 1)) {
              key |= 1 << i1;
              key |= 1 << i2;
              key |= 1 << i3;
              key |= 1 << i4;
              Q1.push_back(key);
            }
          }
        }
  for (int i1 = 0; i1 < 8; ++i1)
    for (int i2 = 0; i2 < 8; ++i2)
      for (int i3 = 0; i3 < 8; ++i3)
        for (int i4 = 0; i4 < 8; ++i4) {
          if (i1 != i2 && i1 != i3 && i1 != i4 && i2 != i3 && i2 != i4 &&
              i3 != i4) {
            int key = 0;
            if (isquad(A[i1], A[i2], A[i3], A[i4], 0)) {
              key |= 1 << i1;
              key |= 1 << i2;
              key |= 1 << i3;
              key |= 1 << i4;
              Q2.push_back(key);
            }
          }
        }
  for (int i = 0; i < Q1.size(); ++i)
    for (int j = 0; j < Q2.size(); ++j) {
      if (Q1[i] != Q2[j] && (Q1[i] + Q2[j]) == 255) {
        cout << "YES" << endl;
        int q1 = Q1[i], q2 = Q2[j];
        int i = 1;
        while (q1) {
          if (q1 & 1) cout << i << " ";
          q1 >>= 1, i++;
        }
        cout << endl;
        i = 1;
        while (q2) {
          if (q2 & 1) cout << i << " ";
          q2 >>= 1, i++;
        }
        cout << endl;
        exit(0);
      }
    }
  cout << "NO" << endl;
  exit(0);
}
int main() {
  load();
  solve();
  return 0;
}