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;
template <class T>
inline T myabs(T x) {
  return (x > 0 ? x : -x);
}
template <class T>
string tostring(T x) {
  ostringstream q;
  q << x;
  return q.str();
}
int strtoint(string x) {
  istringstream q(x);
  int res;
  q >> res;
  return res;
}
const int INF = 0x7FFFFFFF;
bool res = false;
int w[11];
int e[111];
int resa[111];
int resb[111];
int x[111], y[111];
inline long long sqr(long long x) { return x * x; }
inline long long dist(long long x1, long long y1, int x2, int y2) {
  return sqr(x1 - x2) + sqr(y1 - y2);
}
inline bool isparalel(int x1, int y1, int x2, int y2, int x3, int y3, int x4,
                      int y4) {
  int a1 = y1 - y2;
  int b1 = x2 - x1;
  int c1 = -a1 * x1 - b1 * y1;
  int a2 = y3 - y4;
  int b2 = x4 - x3;
  int c2 = -a2 * x3 - b2 * y3;
  if (a1 * b2 == a2 * b1 && (b1 * c2 != b2 * c1 || a1 * c2 != a2 * c1))
    return true;
  else
    return false;
}
bool rect = false;
int xx[111], yy[111];
bool used[11];
int ww[11];
bool kvadrat = false;
void isrect(int v) {
  if (v == 4) {
    int x1 = xx[ww[0]];
    int y1 = yy[ww[0]];
    int x2 = xx[ww[1]];
    int y2 = yy[ww[1]];
    int x3 = xx[ww[2]];
    int y3 = yy[ww[2]];
    int x4 = xx[ww[3]];
    int y4 = yy[ww[3]];
    if (isparalel(x1, y1, x2, y2, x3, y3, x4, y4) &&
        isparalel(x2, y2, x3, y3, x1, y1, x4, y4)) {
      if (dist(x1, y1, x3, y3) == dist(x2, y2, x4, y4)) {
        rect = true;
        int q1 = dist(x1, y1, x2, y2);
        int q2 = dist(x2, y2, x3, y3);
        int q3 = dist(x3, y3, x4, y4);
        int q4 = dist(x4, y4, x1, y1);
        if (q1 == q2 && q2 == q3 && q3 == q4 && q4 == q1) kvadrat = true;
      }
    }
    return;
  }
  for (int i = 0; i < 4; ++i) {
    if (!used[i]) {
      used[i] = true;
      ww[v] = i;
      isrect(v + 1);
      used[i] = false;
    }
  }
}
bool isrectangle(int x1, int y1, int x2, int y2, int x3, int y3, int x4,
                 int y4) {
  rect = false;
  xx[0] = x1;
  yy[0] = y1;
  xx[1] = x2;
  yy[1] = y2;
  xx[2] = x3;
  yy[2] = y3;
  xx[3] = x4;
  yy[3] = y4;
  isrect(0);
  if (rect) return true;
  if (isparalel(x1, y1, x2, y2, x3, y3, x4, y4) &&
      isparalel(x2, y2, x3, y3, x1, y1, x4, y4)) {
    if (dist(x1, y1, x3, y3) == dist(x2, y2, x4, y4)) {
      return true;
    }
  }
  return false;
}
void rec(int v) {
  if (v == 8) {
    if (w[0] == 1 && w[1] == 1 && w[2] == 1 && w[3] == 1 && w[4] == 0 &&
        w[5] == 0 && w[6] == 0) {
      int qw = 1;
    }
    int k = 0;
    for (int i = 0; i < 8; ++i) {
      if (w[i] == 0) e[k++] = i;
    }
    if (k != 4) return;
    kvadrat = false;
    if (isrectangle(x[e[0]], y[e[0]], x[e[1]], y[e[1]], x[e[2]], y[e[2]],
                    x[e[3]], y[e[3]])) {
      if (kvadrat)
        ;
      else
        return;
    } else
      return;
    k = 0;
    for (int i = 0; i < 8; ++i) {
      if (w[i] == 1) e[k++] = i;
    }
    if (k != 4) return;
    if (isrectangle(x[e[0]], y[e[0]], x[e[1]], y[e[1]], x[e[2]], y[e[2]],
                    x[e[3]], y[e[3]]))
      ;
    else
      return;
    res = true;
    k = 0;
    int r = 0;
    for (int i = 0; i < 8; ++i) {
      if (w[i] == 0) {
        resa[k++] = i + 1;
      } else
        resb[r++] = i + 1;
    }
    return;
  }
  w[v] = 0;
  rec(v + 1);
  w[v] = 1;
  rec(v + 1);
}
int main() {
  for (int i = 0; i < 8; ++i) {
    cin >> x[i] >> y[i];
  }
  rec(0);
  if (res) {
    cout << "YES" << endl;
    for (int i = 0; i < 4; ++i) cout << resa[i] << " ";
    cout << endl;
    for (int i = 0; i < 4; ++i) cout << resb[i] << " ";
    cout << endl;
  } else
    cout << "NO" << endl;
  return 0;
}