#include <bits/stdc++.h>
using namespace std;
long long i, k, j, p, q, l;
pair<long long, long long> m[9], a[5];
long long s(pair<long long, long long> a, pair<long long, long long> b) {
  return (a.first - b.first) * (a.first - b.first) +
         (a.second - b.second) * (a.second - b.second);
}
int main() {
  for ((i) = (1); (i) <= (8); (i)++) cin >> m[i].first >> m[i].second;
  for ((i) = (1); (i) <= (5); (i)++)
    for ((j) = (i + 1); (j) <= (6); (j)++)
      for ((p) = (j + 1); (p) <= (7); (p)++)
        for ((q) = (p + 1); (q) <= (8); (q)++) {
          l = 0;
          for ((k) = (1); (k) <= (8); (k)++) {
            if (k != i && k != j && k != p && k != q) {
              l++;
              a[l] = m[k];
            }
          }
          if (((s(m[i], m[j]) == s(m[j], m[p]) &&
                s(m[p], m[q]) == s(m[q], m[i]) &&
                s(m[j], m[p]) == s(m[p], m[q]) &&
                s(m[i], m[p]) == s(m[q], m[j])) ||
               (s(m[i], m[p]) == s(m[p], m[j]) &&
                s(m[j], m[q]) == s(m[q], m[i]) &&
                s(m[p], m[j]) == s(m[j], m[q]) &&
                s(m[q], m[p]) == s(m[i], m[j])) ||
               (s(m[i], m[p]) == s(m[p], m[q]) &&
                s(m[j], m[q]) == s(m[j], m[i]) &&
                s(m[p], m[q]) == s(m[j], m[q]) &&
                s(m[q], m[i]) == s(m[p], m[j]))) &&
              ((s(a[1], a[2]) == s(a[3], a[4]) &&
                s(a[1], a[4]) == s(a[2], a[3]) &&
                s(a[1], a[3]) == s(a[1], a[2]) + s(a[2], a[3])) ||
               (s(a[1], a[3]) == s(a[2], a[4]) &&
                s(a[1], a[4]) == s(a[2], a[3]) &&
                s(a[1], a[2]) == s(a[3], a[2]) + s(a[1], a[3])) ||
               (s(a[1], a[3]) == s(a[2], a[4]) &&
                s(a[3], a[4]) == s(a[2], a[1]) &&
                s(a[1], a[4]) == s(a[1], a[3]) + s(a[4], a[3])))) {
            cout << "YES" << endl
                 << i << ' ' << j << ' ' << p << ' ' << q << endl;
            for ((k) = (1); (k) <= (8); (k)++) {
              if (k != i && k != j && k != p && k != q) {
                cout << k << ' ';
              }
            }
            cin >> k;
            return 0;
          }
        }
  cout << "NO";
  cin >> k;
  return 0;
}
