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;
long long fact[1000001];
long long inv[1000001];
long long primes[100007];
long long arr[1000007];
long long modPower(long long b, long long p) {
  if (p == 0) return 1;
  long long halfpow = modPower(b, p / 2);
  long long toReturn = (halfpow * halfpow) % mod;
  if (p % 2) toReturn = (toReturn * b) % mod;
  return toReturn;
}
long long fastPower(long long b, long long p) {
  if (p == 0) return 1;
  long long ans = fastPower(b, p / 2);
  ans = (ans * ans);
  if (p % 2 != 0) ans = (ans * b);
  return ans;
}
long long GcdRecursive(long long a, long long b) {
  if (b == 0) return a;
  return GcdRecursive(b, a % b);
}
long long modLCM(long long a, long long b) {
  long long val = GcdRecursive(a, b);
  long long tmp = ((a % mod) * (b % mod)) % mod;
  long long finalVal = ((tmp % mod) * (arr[val] % mod)) % mod;
  return finalVal;
}
long long LCM(long long a, long long b) { return (a * b) / GcdRecursive(a, b); }
void move1step(long long& a, long long& b, long long q) {
  long long c = a - q * b;
  a = b;
  b = c;
}
long long GcdIterative(long long a, long long b) {
  while (b) move1step(a, b, a / b);
  return a;
}
void pre(long long n) {
  fact[0] = 1;
  inv[0] = 1;
  for (long long i = 1; i <= n; i++) {
    fact[i] = (i * fact[i - 1]) % mod;
    inv[i] = modPower(fact[i], mod - 2);
    arr[i] = modPower(i, mod - 2);
  }
}
long long npr(long long n, long long r) {
  return ((fact[n] * inv[n - r]) % mod);
}
long long ncr(long long n, long long r) {
  return ((((fact[n] * inv[n - r]) % mod) * inv[r]) % mod);
}
void sieve(long long val) {
  memset(primes, 1, sizeof primes);
  primes[0] = primes[1] = false;
  for (int i = 2; i <= val; i++) {
    if (primes[i]) {
      for (int j = i * i; j <= val; j += i) {
        primes[j] = 0;
      }
    }
  }
}
long double dot(complex<double> a, complex<double> b) {
  return (conj(a) * b).real();
}
long double cross(complex<double> a, complex<double> b) {
  return (conj(a) * b).imag();
}
long double angleBetVec(complex<double> a, complex<double> b) {
  long double d = dot(a, b);
  d /= abs(a);
  d /= abs(b);
  return acos(d) * 180 / acos(-1);
}
complex<double> RotateAbout(complex<double> a, complex<double> about,
                            double angle) {
  return (a - about) * polar(1.0, angle) + about;
}
const long long MOD = 998244353;
const long long N = 1e3 + 7;
const long long inf = 1e18 + 5;
vector<pair<long double, long double> > v(8);
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  for (int i = 0; i < 8; i++) cin >> v[i].first >> v[i].second;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      for (int k = 0; k < 8; k++) {
        for (int l = 0; l < 8; l++) {
          if (i != j && i != k && i != l && j != k && j != l && k != l) {
            vector<long long> s1, s2;
            map<long double, long long> mp;
            long double cnt1 = 0, cnt2 = 0, rct = 0, sq = 0;
            complex<double> a(v[i].first, v[i].second);
            complex<double> b(v[j].first, v[j].second);
            complex<double> c(v[k].first, v[k].second);
            complex<double> d(v[l].first, v[l].second);
            if (dot(b - a, c - a) == 0 || dot(b - a, d - a) == 0 ||
                dot(c - a, d - a) == 0) {
              cnt1++;
            }
            if (dot(a - b, c - b) == 0 || dot(a - b, d - b) == 0 ||
                dot(c - b, d - b) == 0) {
              cnt1++;
            }
            if (dot(b - c, a - c) == 0 || dot(b - c, d - c) == 0 ||
                dot(a - c, d - c) == 0) {
              cnt1++;
            }
            if (dot(b - d, c - d) == 0 || dot(b - d, a - d) == 0 ||
                dot(c - d, a - d) == 0) {
              cnt1++;
            }
            if (cnt1 == 4) rct++;
            for (int m = 0; m < 8; m++) {
              if (m != i && m != j && m != k && m != l)
                s2.push_back(m);
              else
                s1.push_back(m);
            }
            complex<double> aa(v[s2[0]].first, v[s2[0]].second);
            complex<double> bb(v[s2[1]].first, v[s2[1]].second);
            complex<double> cc(v[s2[2]].first, v[s2[2]].second);
            complex<double> dd(v[s2[3]].first, v[s2[3]].second);
            if (dot(bb - aa, cc - aa) == 0 || dot(bb - aa, dd - aa) == 0 ||
                dot(cc - aa, dd - aa) == 0)
              cnt2++;
            if (dot(aa - bb, cc - bb) == 0 || dot(aa - bb, dd - bb) == 0 ||
                dot(cc - bb, dd - bb) == 0)
              cnt2++;
            if (dot(bb - cc, aa - cc) == 0 || dot(bb - cc, dd - cc) == 0 ||
                dot(aa - cc, dd - cc) == 0)
              cnt2++;
            if (dot(bb - dd, cc - dd) == 0 || dot(bb - dd, aa - dd) == 0 ||
                dot(cc - dd, aa - dd) == 0)
              cnt2++;
            mp[abs(bb - aa)]++;
            mp[abs(cc - aa)]++;
            mp[abs(dd - aa)]++;
            mp[abs(bb - cc)]++;
            mp[abs(cc - dd)]++;
            mp[abs(dd - bb)]++;
            if (((mp[abs(bb - aa)] == 4 || mp[abs(cc - aa)] == 4 ||
                  mp[abs(dd - aa)] == 4 || mp[abs(bb - cc)] == 4 ||
                  mp[abs(cc - dd)] == 4 || mp[abs(dd - bb)] == 4) &&
                 cnt2 == 4))
              sq++;
            if (sq == 2 || (rct && sq)) {
              cout << "YES"
                   << "\n";
              for (auto e : s2) cout << ++e << " ";
              cout << "\n";
              for (auto e : s1) cout << ++e << " ";
              return 0;
            }
          }
        }
      }
    }
  }
  cout << "NO";
}