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;
int dig(char c) { return c - '0'; }
char chr(int x) { return (char)(x + '0'); }
int stoi(string second) {
  int x = 0, n = second.length();
  for (int i = 0; i < n; i++) x = x * 10 + dig(second[i]);
  return x;
}
string itos(int x) {
  if (x == 0) return "0";
  string second = "";
  while (x > 0) {
    second = chr(x % 10) + second;
    x /= 10;
  }
  return second;
}
double area(double x1, double y1, double x2, double y2, double x3, double y3) {
  return (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);
}
string root(string second) {
  int n = second.length(), x = 0, i;
  if (n == 1) return second;
  for (i = 0; i < n; i++) x += dig(second[i]);
  return root(itos(x));
}
double dist(double x, double y, double x1, double y1) {
  return sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));
}
int gcd(long long a, long long b) { return (a == 0) ? b : gcd(b % a, a); }
double x[8], y[8];
int a[8];
bool wmod;
bool check(double x1, double y1, double x2, double y2, double x3, double y3,
           double x4, double y4) {
  if (abs(sqrt(dist(x1, y1, x2, y2) * dist(x1, y1, x2, y2) +
               dist(x1, y1, x3, y3) * dist(x1, y1, x3, y3)) -
          dist(x1, y1, x4, y4)) > 1e-7)
    return false;
  double ax, ay, bx, by;
  ax = x2 - x1;
  ay = y2 - y1;
  bx = x3 - x1;
  by = y3 - y1;
  if (abs(x3 + ax - x4) > 1e-7) return false;
  if (abs(y3 + ay - y4) > 1e-7) return false;
  if (abs(x2 + bx - x4) > 1e-7) return false;
  if (abs(y2 + by - y4) > 1e-7) return false;
  return true;
}
bool check1(double x1, double y1, double x2, double y2, double x3, double y3,
            double x4, double y4) {
  if (abs(dist(x1, y1, x2, y2) - dist(x1, y1, x3, y3)) > 1e-7) return false;
  if (!check(x1, y1, x2, y2, x3, y3, x4, y4)) return false;
  return true;
}
bool check2(double x1, double y1, double x2, double y2, double x3, double y3,
            double x4, double y4) {
  if (!check(x1, y1, x2, y2, x3, y3, x4, y4)) return false;
  return true;
}
int main() {
  cout.ios_base::precision(2);
  cout.setf(ios::fixed);
  cin.ios_base::sync_with_stdio(true);
  cout.ios_base::sync_with_stdio(true);
  int n = 8;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i], a[i] = i;
  do {
    if (a[0] == 4 && a[1] == 7 && a[2] == 6 && a[3] == 5 && a[4] == 0 &&
        a[5] == 1 && a[6] == 2 && a[7] == 3) {
      wmod = true;
    }
    if (check1(x[a[0]], y[a[0]], x[a[1]], y[a[1]], x[a[2]], y[a[2]], x[a[3]],
               y[a[3]]) &&
        check2(x[a[4]], y[a[4]], x[a[5]], y[a[5]], x[a[6]], y[a[6]], x[a[7]],
               y[a[7]])) {
      cout << "YES" << endl;
      for (int i = 0; i < 4; i++) cout << a[i] + 1 << " ";
      cout << endl;
      for (int i = 4; i < n; i++) cout << a[i] + 1 << " ";
      return 0;
    }
    wmod = false;
  } while (next_permutation(a, a + n));
  cout << "NO";
  return 0;
}