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;
pair<int, int> p[8];
map<pair<int, int>, int> mp;
pair<int, int> sub(pair<int, int> p1, pair<int, int> p2) {
  pair<int, int> d;
  d.first = p1.first - p2.first;
  d.second = p1.second - p2.second;
  return d;
}
int mod(int a) {
  if (a < 0) return -a;
  return a;
}
bool check(int a, int b, int c, int d) {
  if (a == 0 && b == 1 && c == 6 && d == 7) return 0;
  return 0;
}
bool checkrec(int i, int j, int k, int l) {
  bool pr = 0;
  if (check(i, j, k, l)) {
    cout << "z";
    pr = 1;
    for (int i2 = 0; i2 < 8; i2++)
      if (i2 == i || i2 == j || i2 == k || i2 == l)
        cout << i2 << " : " << p[i2].first << " " << p[i2].second << "\n";
    cout << mp[p[i]] << " " << mp[p[j]] << " " << mp[p[k]] << " " << mp[p[l]]
         << "\n";
  }
  pair<int, int> d1 = sub(p[l], p[i]);
  pair<int, int> d2 = sub(p[k], p[j]);
  int d11 = d1.first * d1.first + d1.second * d1.second;
  int d22 = d2.first * d2.first + d2.second * d2.second;
  if (d11 != d22) return 0;
  pair<int, int> d3 = sub(p[j], p[i]);
  pair<int, int> d4 = sub(p[l], p[k]);
  if (mod(d3.second * d4.first) != mod(d4.second * d3.first)) return 0;
  if (pr == 1) cout << "x";
  pair<int, int> d5 = d3;
  pair<int, int> d6 = d4;
  d3 = sub(p[l], p[j]);
  d4 = sub(p[k], p[i]);
  if (mod(d3.second * d4.first) != mod(d4.second * d3.first)) return 0;
  if (pr == 1)
    cout << d3.first << " " << d3.second << " " << d5.first << " " << d5.second
         << "\n";
  if (d3.second * d5.second + d3.first * d5.first != 0) return 0;
  if (pr == 1) cout << "zr";
  if (d3.second * d6.second + d3.first * d6.first != 0) return 0;
  if (d4.second * d6.second + d4.first * d6.first != 0) return 0;
  if (d4.second * d5.second + d4.first * d5.first != 0) return 0;
  return 1;
}
bool checksq(int i, int j, int k, int l) {
  if (!checkrec(i, j, k, l)) return 0;
  pair<int, int> d1 = sub(p[l], p[i]);
  pair<int, int> d2 = sub(p[k], p[j]);
  bool pr = 0;
  if (check(i, j, k, l)) pr = 1;
  if (pr) {
    cout << "pq";
    if (pr == 1)
      cout << d1.first << " " << d1.second << " " << d2.first << " "
           << d2.second << "\n";
  }
  if (d1.second * d2.second + d2.first * d1.first == 0) return 1;
  return 0;
}
int main() {
  int n = 8, i, j, k, l, m;
  for (i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
    mp[p[i]] = i + 1;
  }
  sort(p, p + n);
  bool pr = 0;
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      for (k = j + 1; k < n; k++) {
        for (l = k + 1; l < n; l++) {
          int i1 = -1, j1 = -1, k1 = -1, l1 = -1;
          for (m = 0; m < n; m++) {
            if (m != i && m != j && m != k && m != l) {
              if (i1 < 0)
                i1 = m;
              else if (j1 < 0)
                j1 = m;
              else if (k1 < 0)
                k1 = m;
              else if (l1 < 0)
                l1 = m;
            }
          }
          bool b1 = checksq(i, j, k, l);
          bool b2 = checkrec(i1, j1, k1, l1);
          if (b1 && b2) {
            cout << "YES\n";
            cout << mp[p[i]] << " " << mp[p[j]] << " " << mp[p[k]] << " "
                 << mp[p[l]] << "\n";
            cout << mp[p[i1]] << " " << mp[p[j1]] << " " << mp[p[k1]] << " "
                 << mp[p[l1]] << "\n";
            return 0;
          }
          b1 = checkrec(i, j, k, l);
          b2 = checksq(i1, j1, k1, l1);
          if (b1 && b2) {
            cout << "YES\n";
            cout << mp[p[i1]] << " " << mp[p[j1]] << " " << mp[p[k1]] << " "
                 << mp[p[l1]] << "\n";
            cout << mp[p[i]] << " " << mp[p[j]] << " " << mp[p[k]] << " "
                 << mp[p[l]] << "\n";
            return 0;
          }
        }
      }
    }
  }
  cout << "NO\n";
  return 0;
}