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;
const double EPS = 1e-9;
const double PI = acos(-1.0);
template <class T>
class Point {
 public:
  T x, y;
  Point(){};
  Point(long double x, long double y) {
    this->x = x;
    this->y = y;
  }
  Point operator+(const Point &b) const { return Point(x + b.x, y + b.y); }
  Point operator-(const Point &b) const { return Point(x - b.x, y - b.y); }
  Point operator+=(const Point &b) {
    this->x += b.x;
    this->y += b.y;
    return Point(this->x, this->y);
  }
  Point operator-=(const Point &b) {
    this->x -= b.x;
    this->y -= b.y;
    return Point(this->x, this->y);
  }
  bool operator==(const Point &b) const {
    return (abs(x - b.x) < EPS and abs(y - b.y) < EPS);
  }
  bool operator<(const Point &b) const {
    return (x < b.x or (x == b.x and y < b.y));
  }
  T operator*(const Point &b) const {
    return (this->x * b.x) + (this->y * b.y);
  }
  T operator^(const Point &b) const {
    return (this->x * b.y) - (this->y * b.x);
  }
  Point operator/(T k) const {
    if (k == 0) cout << "Dividisão por 0" << endl;
    return Point(x / k, y / k);
  }
  Point operator*(T k) const { return Point(x * k, y * k); }
  T tamanho() const { return sqrt(x * x + y * y); }
  T tamanho2() { return x * x + y * y; }
  T dpp2(const Point &b) const { return ((*this) - b).tamanho2(); }
  T dpp(const Point &b) const { return ((*this) - b).tamanho(); }
  static T area(vector<Point> v) {
    T area = 0.0;
    for (int i = 0; i < (int)v.size(); i++)
      area += v[i] ^ v[(i + 1) % v.size()];
    return abs(area / 2.0);
  }
  static bool inside(const vector<Point> &v, const Point &p) {
    int n = v.size();
    if (n < 3) return false;
    if (((v[1] - v[0]) ^ (p - v[0])) < 0) return false;
    int bot = 2, top = n - 1;
    int ans = -1;
    while (bot <= top) {
      int mid = (bot + top) >> 1;
      if (((v[mid] - v[0]) ^ (p - v[0])) <= 0) {
        ans = mid;
        top = mid - 1;
      } else {
        bot = mid + 1;
      }
    }
    if (ans == -1) return false;
    if (((v[ans] - v[ans - 1]) ^ (p - v[ans - 1])) < 0) return false;
    return true;
  }
  static vector<Point> convex_hull(vector<Point> p) {
    if (p.size() <= 2) return p;
    int n = p.size(), k = 0;
    vector<Point> H(2 * n);
    sort(p.begin(), p.end());
    for (int i = 0; i < n; i++) {
      while (k >= 2 and ((H[k - 1] - H[k - 2]) ^ (p[i] - H[k - 2])) <= 0.0) k--;
      H[k++] = p[i];
    }
    for (int i = n - 2, t = k + 1; i >= 0; i--) {
      while (k >= t and ((H[k - 1] - H[k - 2]) ^ (p[i] - H[k - 2])) <= 0.0) k--;
      H[k++] = p[i];
    }
    H.resize(k - 1);
    return H;
  }
};
template <class T>
T getAreaTriangle(T a, T b, T c) {
  T p = (a + b + c) / 2.0;
  return sqrt(p * (p - a) * (p - b) * (p - c));
}
vector<Point<int> > todos;
void back(int bitmask, int quant, int posi) {
  if (quant == 4) {
    std::vector<Point<int> > tentativaq, tentativar;
    std::vector<int> respq, respr;
    int auxposi = 0;
    while (bitmask != 0) {
      if (bitmask % 2 == 1) {
        tentativaq.push_back(todos[auxposi]);
        respq.push_back(auxposi);
      } else {
        tentativar.push_back(todos[auxposi]);
        respr.push_back(auxposi);
      }
      auxposi++;
      bitmask /= 2;
    }
    for (int i = auxposi; i < 8; i++) {
      tentativar.push_back(todos[i]);
      respr.push_back(i);
    }
    bool quadrado = true;
    bool retangulo = true;
    tentativar = tentativar[0].convex_hull(tentativar);
    tentativaq = tentativaq[0].convex_hull(tentativaq);
    int dist = tentativaq[0].dpp2(tentativaq[1]);
    for (int i = 0; i < 4; i++) {
      if (tentativaq[i].dpp2(tentativaq[(i + 1) % 4]) != dist) quadrado = false;
    }
    int dist1, dist2;
    dist1 = tentativar[0].dpp2(tentativar[1]);
    dist2 = tentativar[1].dpp2(tentativar[2]);
    if (tentativar[2].dpp2(tentativar[3]) != dist1 or
        tentativar[3].dpp2(tentativar[0]) != dist2)
      retangulo = false;
    int distdr = tentativar[0].dpp2(tentativar[2]);
    int distdq = tentativaq[0].dpp2(tentativaq[2]);
    if (tentativaq[1].dpp2(tentativaq[3]) != distdq) quadrado = false;
    if (tentativar[1].dpp2(tentativar[3]) != distdr) retangulo = false;
    if (retangulo == true and quadrado == true) {
      cout << "YES" << endl;
      for (int i = 0; i < 4; i++) cout << respq[i] + 1 << " ";
      cout << endl;
      for (int i = 0; i < 4; i++) cout << respr[i] + 1 << " ";
      cout << endl;
      exit(0);
    }
    return;
  }
  if (posi == 8) return;
  back((bitmask + (1 << posi)), quant + 1, posi + 1);
  back(bitmask, quant, posi + 1);
}
int main() {
  ios_base::sync_with_stdio(false);
  ;
  for (int i = 0; i < 8; i++) {
    int x, y;
    cin >> x >> y;
    Point<int> aux;
    aux.x = x;
    aux.y = y;
    todos.push_back(aux);
  }
  back(0, 0, 0);
  cout << "NO" << endl;
  return 0;
}