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>
struct point {
  int x;
  int y;
};
point operator+(point const& a, point const& b) {
  point p;
  p.x = a.x + b.x;
  p.y = a.y + b.y;
  return p;
}
point operator-(point const& a, point const& b) {
  point p;
  p.x = a.x - b.x;
  p.y = a.y - b.y;
  return p;
}
template <typename Ite>
Ite cnext(Ite it, Ite begin, Ite end) {
  ++it;
  if (it == end)
    return begin;
  else
    return it;
}
template <typename Ite>
Ite cprev(Ite it, Ite begin, Ite end) {
  if (it == begin)
    return (--end);
  else
    return (--it);
}
std::ostream& operator<<(std::ostream& out, std::array<point, 4> const& v) {
  std::ostringstream ost;
  ost << "{";
  for (int i = 0; i < v.size(); ++i) {
    ost << v[i].x << "," << v[i].y;
    if (i != v.size() - 1) ost << "  ";
  }
  ost << "}";
  out << ost.str();
  return out;
}
bool is_square(std::array<point, 4> const& points) {
  for (int i = 0; i < 4; ++i) {
    point p = *cprev(points.begin() + i, points.begin(), points.end());
    point c = *(points.begin() + i);
    point n = *cnext(points.begin() + i, points.begin(), points.end());
    point cp = p - c, cn = n - c;
    int ip = cp.x * cn.x + cp.y * cn.y;
    if (ip != 0) return false;
  }
  point a = points[3] - points[0];
  int side2 = a.x * a.x + a.y * a.y;
  for (int i = 0; i < 3; ++i) {
    point b = points[i + 1] - points[i];
    int s = b.x * b.x + b.y * b.y;
    if (s != side2) return false;
  }
  return true;
}
bool is_rec(std::array<point, 4> const& points) {
  for (int i = 0; i < 4; ++i) {
    point p = *cprev(points.begin() + i, points.begin(), points.end());
    point c = *(points.begin() + i);
    point n = *cnext(points.begin() + i, points.begin(), points.end());
    point cp = p - c, cn = n - c;
    int ip = cp.x * cn.x + cp.y * cn.y;
    if (ip != 0) return false;
  }
  return true;
}
bool valid(std::vector<point> const& points, std::array<int, 4>& g1,
           std::array<int, 4>& g2) {
  do {
    do {
      std::array<point, 4> gp1, gp2;
      for (int i = 0; i < 4; ++i) {
        gp1[i] = points[g1[i]];
        gp2[i] = points[g2[i]];
      }
      bool sq1 = is_square(gp1);
      bool sq2 = is_square(gp2);
      bool r1 = sq1 || sq2;
      bool r2 = is_rec(gp1) && is_rec(gp2);
      if (r1 && r2) {
        if (sq1) {
          std::cout << "YES" << std::endl;
          for (int j = 0; j < 4; ++j) {
            std::cout << g1[j] + 1;
            if (j != 3) std::cout << " ";
          }
          std::cout << std::endl;
          for (int j = 0; j < 4; ++j) {
            std::cout << g2[j] + 1;
            if (j != 3) std::cout << " ";
          }
          std::cout << std::endl;
        } else {
          std::cout << "YES" << std::endl;
          for (int j = 0; j < 4; ++j) {
            std::cout << g2[j] + 1;
            if (j != 3) std::cout << " ";
          }
          std::cout << std::endl;
          for (int j = 0; j < 4; ++j) {
            std::cout << g1[j] + 1;
            if (j != 3) std::cout << " ";
          }
          std::cout << std::endl;
        }
        return true;
      }
    } while (std::next_permutation(g1.begin(), g1.end()));
  } while (std::next_permutation(g2.begin(), g2.end()));
  return false;
}
int main() {
  std::vector<point> points;
  for (int i = 0; i < 8; ++i) {
    point p;
    std::cin >> p.x >> p.y;
    points.push_back(p);
  }
  std::vector<int> choice = {0, 0, 0, 0, 1, 1, 1, 1};
  do {
    std::array<int, 4> g1, g2;
    int c1 = 0, c2 = 0;
    for (int i = 0; i < 8; ++i) {
      if (choice[i] == 0) {
        g1[c1] = i;
        ++c1;
      } else {
        g2[c2] = i;
        ++c2;
      }
    }
    if (valid(points, g1, g2)) {
      return 0;
    }
  } while (std::next_permutation(choice.begin(), choice.end()));
  std::cout << "NO" << std::endl;
}