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 maxn = 500005;
const long long inf = 0x3f3f3f3f3f3f3f3f;
const long long MOD = 100000007;
const double eps = 1e-10;
long long qpow(long long a, long long b) {
  long long tmp = a % MOD, ans = 1;
  while (b) {
    if (b & 1) {
      ans *= tmp, ans %= MOD;
    }
    tmp *= tmp, tmp %= MOD, b >>= 1;
  }
  return ans;
}
long long lowbit(long long x) { return x & -x; }
long long max(long long a, long long b) { return a > b ? a : b; }
long long min(long long a, long long b) { return a < b ? a : b; }
long long mmax(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
long long mmin(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
void mod(long long &a) {
  a += MOD;
  a %= MOD;
}
bool chk(long long now) {}
long long half(long long l, long long r) {
  while (l <= r) {
    long long m = (l + r) / 2;
    if (chk(m))
      r = m - 1;
    else
      l = m + 1;
  }
  return l;
}
long long ll(long long p) { return p << 1; }
long long rr(long long p) { return p << 1 | 1; }
long long mm(long long l, long long r) { return (l + r) / 2; }
long long lg(long long x) {
  if (x == 0) return 1;
  return (long long)log2(x) + 1;
}
bool smleql(double a, double b) {
  if (a < b || fabs(a - b) <= eps) return true;
  return false;
}
bool bigeql(double a, double b) {
  if (a > b || fabs(a - b) <= eps) return true;
  return false;
}
bool eql(double a, double b) {
  if (fabs(a - b) < eps) return 1;
  return 0;
}
double len(double a, double b, double c, double d) {
  return sqrt((a - c) * (a - c) + (b - d) * (b - d));
}
bool isp(long long x) {
  if (x == 1) return false;
  if (x == 2) return true;
  for (long long i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
inline long long read() {
  char ch = getchar();
  long long s = 0, w = 1;
  while (ch < 48 || ch > 57) {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= 48 && ch <= 57) {
    s = (s << 1) + (s << 3) + ch - 48;
    ch = getchar();
  }
  return s * w;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + 48);
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (!(a & 1) && !(b & 1))
    return gcd(a >> 1, b >> 1) << 1;
  else if (!(b & 1))
    return gcd(a, b >> 1);
  else if (!(a & 1))
    return gcd(a >> 1, b);
  else
    return gcd(abs(a - b), min(a, b));
}
long long lcm(long long x, long long y) { return x * y / gcd(x, y); }
long long ord[9];
pair<double, double> p[9];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  for (long long i = 1; i <= 8; ++i)
    cin >> p[i].first >> p[i].second, ord[i] = i;
  do {
    bool can = 1;
    double l = len(p[ord[1]].first, p[ord[1]].second, p[ord[4]].first,
                   p[ord[4]].second);
    for (long long i = 1; i <= 3; ++i) {
      if (!eql(l, len(p[ord[i]].first, p[ord[i]].second, p[ord[i + 1]].first,
                      p[ord[i + 1]].second))) {
        can = 0;
        break;
      }
    }
    if (!eql(len(p[ord[1]].first, p[ord[1]].second, p[ord[3]].first,
                 p[ord[3]].second),
             len(p[ord[2]].first, p[ord[2]].second, p[ord[4]].first,
                 p[ord[4]].second)))
      can = 0;
    if (!can) continue;
    vector<double> v;
    for (long long i = 5; i <= 7; ++i)
      v.push_back(len(p[ord[i]].first, p[ord[i]].second, p[ord[i + 1]].first,
                      p[ord[i + 1]].second));
    v.push_back(len(p[ord[5]].first, p[ord[5]].second, p[ord[8]].first,
                    p[ord[8]].second));
    if (eql(v[0], v[2]) && eql(v[1], v[3])) {
      if (!eql(len(p[ord[5]].first, p[ord[5]].second, p[ord[7]].first,
                   p[ord[7]].second),
               len(p[ord[6]].first, p[ord[6]].second, p[ord[8]].first,
                   p[ord[8]].second)))
        continue;
      cout << "YES" << endl;
      for (long long i = 1; i <= 4; ++i) cout << ord[i] << ' ';
      cout << endl;
      for (long long i = 5; i <= 8; ++i) cout << ord[i] << ' ';
      return 0;
    }
  } while (next_permutation(ord + 1, ord + 9));
  cout << "NO" << endl;
  return 0;
}