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>
const long double pi = 3.14159265358979323846;
using namespace std;
long long fact(long long n) {
  long long f = 1;
  for (long long i = n; i >= 1; i--) f *= i;
  return f;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool prime(int n) {
  if (n == 1) return false;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int divisor(int n) {
  int r = 0, x = sqrt(n), ar[10000], sum = 0;
  if (x * x == n) ar[r++] = x;
  for (int i = 1; i <= x; i++)
    if (n % i == 0) ar[r++] = i, ar[r++] = n / i;
  for (int i = 0; i < r; i++)
    if (prime(ar[i])) sum += ar[i];
  return sum;
}
bool palindrome_str(string n) {
  string s = n;
  reverse(s.begin(), s.end());
  if (s == n) return true;
  return false;
}
bool palindrome_num(int n) {
  string s;
  string x = s;
  reverse(x.begin(), s.end());
  if (x == s) return true;
  return false;
}
void small(string &n) {
  for (int i = 0; i < n.size(); i++)
    if (n[i] >= 'A' && n[i] <= 'Z') n[i] += 32;
}
void capital(string &n) {
  for (int i = 0; i < n.size(); i++)
    if (n[i] >= 'a' && n[i] <= 'z') n[i] -= 32;
}
int convert_int(string s) {
  stringstream ss(s);
  int x;
  ss >> x;
  return x;
}
string convert_string(int x) {
  stringstream ss;
  string s;
  ss << x;
  s = ss.str();
  return s;
}
long long fast_power(long long n, long long m) {
  if (m == 0) return 0;
  if (m == 1) return n;
  long long x = fast_power(n, m / 2) % 1000000007;
  x = (x * x) % 1000000007;
  if (m % 2 != 0) x *= n;
  x %= 1000000007;
  return x;
}
void fast() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
int x[8], y[8];
int s[4], r[4];
bool square(int i, int j, int k, int l) {
  double ab = sqrt(pow((x[i] - x[j]), 2) + pow((y[i] - y[j]), 2));
  double bc = sqrt(pow((x[j] - x[k]), 2) + pow((y[j] - y[k]), 2));
  double cd = sqrt(pow((x[k] - x[l]), 2) + pow((y[k] - y[l]), 2));
  double da = sqrt(pow((x[l] - x[i]), 2) + pow((y[l] - y[i]), 2));
  double ac = sqrt(pow((x[i] - x[k]), 2) + pow((y[i] - y[k]), 2));
  double bd = sqrt(pow((x[j] - x[l]), 2) + pow((y[j] - y[l]), 2));
  if (ab == bc && bc == cd && cd == da && ac == bd) return 1;
  return 0;
}
bool rect(int i, int j, int k, int l) {
  double ab = sqrt(pow((x[i] - x[j]), 2) + pow((y[i] - y[j]), 2));
  double bc = sqrt(pow((x[j] - x[k]), 2) + pow((y[j] - y[k]), 2));
  double cd = sqrt(pow((x[k] - x[l]), 2) + pow((y[k] - y[l]), 2));
  double da = sqrt(pow((x[l] - x[i]), 2) + pow((y[l] - y[i]), 2));
  double ac = sqrt(pow((x[i] - x[k]), 2) + pow((y[i] - y[k]), 2));
  double bd = sqrt(pow((x[j] - x[l]), 2) + pow((y[j] - y[l]), 2));
  if (ac == bd && ab == cd && bc == da) return 1;
  return 0;
}
int main() {
  for (int i = 0; i < 8; i++) cin >> x[i] >> y[i];
  bool f1 = 0, f2 = 0;
  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)
            f1 = square(i, j, k, l);
          if (f1) {
            s[0] = i;
            s[1] = j;
            s[2] = k;
            s[3] = l;
            break;
          }
        }
        if (f1) break;
      }
      if (f1) break;
    }
    if (f1) break;
  }
  if (!f1)
    cout << "NO\n";
  else {
    int c = 0;
    sort(s, s + 4);
    for (int i = 0; i < 8; i++)
      if (i != s[0] && i != s[1] && i != s[2] && i != s[3]) r[c++] = i;
    sort(r, r + 4);
    do {
      f2 = rect(r[0], r[1], r[2], r[3]);
      if (f2) break;
    } while (next_permutation(r, r + 4));
    if (f1 && f2) {
      cout << "YES\n";
      for (int i = 0; i < 4; i++) cout << s[i] + 1 << " ";
      cout << endl;
      for (int i = 0; i < 4; i++) cout << r[i] + 1 << " ";
      cout << endl;
    } else
      cout << "NO\n";
  }
}