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>
#pragma comment(linker, "/STACK:268435456")
using namespace std;
template <class T>
T abs(T &x) {
  return (x >= 0) ? (x) : (-x);
}
template <class T>
T sqr(T &x) {
  return (x) * (x);
}
template <class T>
T min(T &a, T &b) {
  return (a < b) ? (a) : (b);
}
template <class T>
T max(T &a, T &b) {
  return (a > b) ? (a) : (b);
}
long long x[10], y[10];
int p[10], q[10];
long long xx[10], yy[10];
long long xxx[10], yyy[10];
long long len2[10];
long long sqDist(long long x1, long long y1, long long x2, long long y2) {
  long long dx = x1 - x2;
  long long dy = y1 - y2;
  return dx * dx + dy * dy;
}
long long getDoubleArea() {
  long long res = 0;
  for (int i = 0; i < 4; i++) {
    int j = (i + 1) % 4;
    res += xxx[i] * yyy[j] - xxx[j] * yyy[i];
  }
  return abs(res);
}
bool checkRect() {
  for (int i = 0; i < 4; i++) {
    xxx[i] = xx[q[i]];
    yyy[i] = yy[q[i]];
  }
  long long doubleArea = getDoubleArea();
  if (doubleArea == 0) return false;
  for (int i = 0; i < 4; i++) {
    int j = (i + 1) % 4;
    len2[i] = sqDist(xxx[i], yyy[i], xxx[j], yyy[j]);
  }
  if (len2[0] != len2[2]) return false;
  if (len2[1] != len2[3]) return false;
  long long a2 = len2[0], b2 = len2[1];
  if (a2 * b2 * 4 != doubleArea * doubleArea) return false;
  return true;
}
bool checkSq() {
  for (int i = 0; i < 4; i++) {
    xxx[i] = xx[q[i]];
    yyy[i] = yy[q[i]];
  }
  long long doubleArea = getDoubleArea();
  if (doubleArea == 0) return false;
  for (int i = 0; i < 4; i++) {
    int j = (i + 1) % 4;
    len2[i] = sqDist(xxx[i], yyy[i], xxx[j], yyy[j]);
  }
  for (int i = 0; i < 4; i++)
    if (2 * len2[i] != doubleArea) return false;
  return true;
}
bool sqResult, rectResult;
void genSq(int L, int R) {
  if (L == R) {
    if (checkSq()) sqResult = true;
  } else {
    for (int i = L; i <= R; i++) {
      swap(q[i], q[L]);
      genSq(L + 1, R);
      swap(q[i], q[L]);
    }
  }
}
void genRect(int L, int R) {
  if (L == R) {
    if (checkRect()) rectResult = true;
  } else {
    for (int i = L; i <= R; i++) {
      swap(q[i], q[L]);
      genRect(L + 1, R);
      swap(q[i], q[L]);
    }
  }
}
bool isRect() {
  for (int i = 0; i < 4; i++) {
    xx[i] = x[p[i + 4]];
    yy[i] = y[p[i + 4]];
    q[i] = i;
  }
  rectResult = false;
  genRect(0, 3);
  return rectResult;
}
bool isSquare() {
  for (int i = 0; i < 4; i++) {
    xx[i] = x[p[i]];
    yy[i] = y[p[i]];
    q[i] = i;
  }
  sqResult = false;
  genSq(0, 3);
  return sqResult;
}
bool check() {
  bool res = true;
  if (!isSquare()) res = false;
  if (!isRect()) res = false;
  return res;
}
bool found = false;
void gen(int L, int R) {
  if (found) return;
  if (L == R) {
    if (check()) {
      found = true;
      return;
    }
  } else {
    for (int i = L; i <= R; i++) {
      swap(p[i], p[L]);
      gen(L + 1, R);
      if (found) return;
      swap(p[i], p[L]);
    }
  }
}
int main() {
  for (int i = 0; i < 8; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < 8; i++) p[i] = i;
  gen(0, 7);
  if (found) {
    cout << "YES" << endl;
    for (int i = 0; i < 4; i++) cout << p[i] + 1 << " ";
    cout << endl;
    for (int i = 4; i < 8; i++) cout << p[i] + 1 << " ";
    cout << endl;
  } else
    cout << "NO";
}