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 long long MOD = 1e9 + 7;
const long long inf = 10000000;
const double pi = acos(-1.0);
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
inline bool isLeapYear(long long year) {
  return (year % 400 == 0) || (year % 4 == 0 && year % 100 != 0);
}
inline void normal(long long &a) {
  a %= MOD;
  (a < 0) && (a += MOD);
}
inline long long modMul(long long a, long long b) {
  a %= MOD, b %= MOD;
  normal(a), normal(b);
  return (a * b) % MOD;
}
inline long long modAdd(long long a, long long b) {
  a %= MOD, b %= MOD;
  normal(a), normal(b);
  return (a + b) % MOD;
}
inline long long modSub(long long a, long long b) {
  a %= MOD, b %= MOD;
  normal(a), normal(b);
  a -= b;
  normal(a);
  return a;
}
inline long long modPow(long long b, long long p) {
  long long r = 1;
  while (p) {
    if (p & 1) r = modMul(r, b);
    b = modMul(b, b);
    p >>= 1;
  }
  return r;
}
inline long long modInverse(long long a) { return modPow(a, MOD - 2); }
inline long long modDiv(long long a, long long b) {
  return modMul(a, modInverse(b));
}
inline bool checkBit(long long n, int i) { return n & (1LL << i); }
inline long long setBit(long long n, int i) {
  return n | (1LL << i);
  ;
}
inline long long resetBit(long long n, int i) { return n & (~(1LL << i)); }
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
void input(long long n, const long long a[], int co = 0) {
  long long i = 1;
  for (; i <= n; i++) {
    if (co == 0)
      scanf("%lld", &a[i]);
    else
      printf("%lld ", a[i]);
  }
}
struct PT {
  int x, y;
  inline void scan() { scanf("%d %d", &x, &y); }
  bool operator<(const PT &a) {
    if (x == a.x) return y < a.y;
    return x < a.x;
  }
  bool operator==(const PT &b) { return x == b.x && y == b.y; }
};
inline int sq(int x) { return x * x; }
vector<int> ps;
PT a[10];
inline int dis(int i, int j) {
  int x1 = a[i].x, y1 = a[i].y;
  int x2 = a[j].x, y2 = a[j].y;
  return sq(x1 - x2) + sq(y1 - y2);
}
inline bool eqdis(int a, int b, int c) {
  return dis(a, b) + dis(b, c) == dis(a, c);
}
inline bool r8(vector<int> &X, int b) {
  bool f = true;
  f &= eqdis(X[0], X[1], X[2]);
  f &= eqdis(X[1], X[2], X[3]);
  f &= eqdis(X[2], X[3], X[0]);
  f &= eqdis(X[3], X[0], X[1]);
  if (b == 1) return f;
  X.push_back(X[0]);
  for (int i = 1; i <= 3; i++) f &= dis(X[i - 1], X[i]) == dis(X[i], X[i + 1]);
  return f;
}
int main() {
  for (int i = 1; i <= 8; i++) {
    ps.push_back(i);
    scanf("%d %d", &a[i].x, &a[i].y);
  }
  do {
    vector<int> A, B;
    for (int i = int(0); i < int(4); ++i) A.push_back(ps[i]);
    for (int i = int(4); i < int(8); ++i) B.push_back(ps[i]);
    if (r8(A, 0) && r8(B, 1)) {
      puts("YES");
      for (int i = 0; i < 8; i++) {
        cout << ps[i];
        if (i == 3 || i == 7)
          cout << endl;
        else
          cout << " ";
      }
      return 0;
    }
  } while (next_permutation(ps.begin(), ps.end()));
  cout << "NO";
  return 0;
}