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 PI = acos(-1.0);
int toInt(string s) {
  int r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
long long toInt64(string s) {
  long long r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
double toDouble(string s) {
  double r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
double dist(double x1, double y1, double x2, double y2) {
  return sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
}
bool isUpperCase(char c) { return c >= 'A' && c <= 'Z'; }
bool isLowerCase(char c) { return c >= 'a' && c <= 'z'; }
bool isLetter(char c) { return c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z'; }
bool isDigit(char c) { return c >= '0' && c <= '9'; }
char toLowerCase(char c) { return (isUpperCase(c)) ? (c + 32) : c; }
char toUpperCase(char c) { return (isLowerCase(c)) ? (c - 32) : c; }
template <class T>
inline T strTo(string s) {
  istringstream is(s);
  T v;
  is >> v;
  return v;
}
template <class T>
inline string toStr(const T& v) {
  ostringstream os;
  os << v;
  return os.str();
}
template <class T>
inline int cMin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
inline int cMax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
inline int cBit(T n) {
  return n ? cBit(n & (n - 1)) + 1 : 0;
}
template <class T>
inline T lowbit(T n) {
  return (n ^ (n - 1)) & n;
}
template <class T>
inline T GCD(T a, T b) {
  if (a < 0) return GCD(-a, b);
  if (b < 0) return GCD(a, -b);
  return (b == 0) ? a : GCD(b, a % b);
}
template <class T>
inline T LCM(T a, T b) {
  if (a < 0) return LCM(-a, b);
  if (b < 0) return LCM(a, -b);
  return a * (b / gcd(a, b));
}
struct Point {
  int x, y;
} d[10];
int mul(Point p1, Point p0, Point p2) {
  return (p1.x - p0.x) * (p2.x - p0.x) + (p2.y - p0.y) * (p1.y - p0.y);
}
int dis(Point p1, Point p2) {
  return ((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
}
int main() {
  for (int i = 1; i <= 8; i++) cin >> d[i].x >> d[i].y;
  bool flag = false;
  for (int i = 1; i <= 8 && !flag; i++) {
    for (int j = 1; j <= 8 && !flag; j++) {
      if (j == i) continue;
      for (int k = 1; k <= 8 && !flag; k++) {
        if (k == j || k == i) continue;
        for (int l = 1; l <= 8 && !flag; l++) {
          if (l == k || l == j || l == i) continue;
          if (!mul(d[i], d[j], d[k]) && dis(d[i], d[j]) == dis(d[j], d[k]) &&
              dis(d[i], d[j]) == dis(d[k], d[l]) &&
              dis(d[i], d[j]) == dis(d[l], d[i])) {
            bool v[10];
            memset(v, 0, sizeof(v));
            v[i] = v[j] = v[k] = v[l] = true;
            int m[6], p = 0;
            for (int q = 1; q <= 8; q++)
              if (!v[q]) m[p++] = q;
            for (int x1 = 0; x1 < p && !flag; x1++)
              for (int x2 = 0; x2 < p && !flag; x2++) {
                if (x2 == x1) continue;
                for (int x3 = 0; x3 < p && !flag; x3++) {
                  if (x3 == x1 || x3 == x2) continue;
                  for (int x4 = 0; x4 < p && !flag; x4++) {
                    if (x4 == x1 || x4 == x2 || x4 == x3) continue;
                    int l1 = m[x1], l2 = m[x2], l3 = m[x3], l4 = m[x4];
                    if (!mul(d[l1], d[l2], d[l3]) &&
                        !mul(d[l2], d[l3], d[l4]) &&
                        !mul(d[l3], d[l4], d[l1]) &&
                        !mul(d[l4], d[l1], d[l2])) {
                      flag = true;
                      cout << "YES" << endl;
                      cout << i << " " << j << " " << k << " " << l << endl;
                      cout << l1 << " " << l2 << " " << l3 << " " << l4 << endl;
                    }
                  }
                }
              }
          }
        }
      }
    }
  }
  if (!flag) cout << "NO" << endl;
  return 0;
}