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 PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const long long infLL = 9000000000000000000;
inline bool checkBit(long long n, int i) { return n & (1LL << i); }
inline long long setBit(long long n, int i) {
  return n | (1LL << i);
  ;
}
inline long long resetBit(long long n, int i) { return n & (~(1LL << i)); }
int dx4[] = {0, 0, +1, -1};
int dy4[] = {+1, -1, 0, 0};
int dx8[] = {+1, 0, -1, 0, +1, +1, -1, -1};
int dy8[] = {0, +1, 0, -1, +1, -1, +1, -1};
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
inline bool isLeapYear(long long year) {
  return (year % 400 == 0) || (year % 4 == 0 && year % 100 != 0);
}
inline bool isIntege(double num) { return (num == (int)num); }
inline bool collinear(int x1, int y1, int x2, int y2, int x3, int y3) {
  return (y1 - y2) * (x1 - x3) == (y1 - y3) * (x1 - x2);
}
inline double coDist(double x1, double y1, double x2, double y2) {
  return sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
}
inline long double degreetoradian(long double x) {
  long double val = PI * x;
  val /= (180.0);
  return val;
}
inline void normal(long long &a) {
  a %= 1000000007;
  (a < 0) && (a += 1000000007);
}
inline long long modMul(long long a, long long b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  return (a * b) % 1000000007;
}
inline long long modAdd(long long a, long long b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  return (a + b) % 1000000007;
}
inline long long modSub(long long a, long long b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  a -= b;
  normal(a);
  return a;
}
inline long long modPow(long long b, long long p) {
  long long r = 1;
  while (p) {
    if (p & 1) r = modMul(r, b);
    b = modMul(b, b);
    p >>= 1;
  }
  return r;
}
inline long long modInverse(long long a) { return modPow(a, 1000000007 - 2); }
inline long long modDiv(long long a, long long b) {
  return modMul(a, modInverse(b));
}
inline bool equalTo(double a, double b) {
  if (fabs(a - b) <= eps)
    return true;
  else
    return false;
}
inline bool notEqual(double a, double b) {
  if (fabs(a - b) > eps)
    return true;
  else
    return false;
}
inline bool lessThan(double a, double b) {
  if (a + eps < b)
    return true;
  else
    return false;
}
inline bool lessThanEqual(double a, double b) {
  if (a < b + eps)
    return true;
  else
    return false;
}
inline bool greaterThan(double a, double b) {
  if (a > b + eps)
    return true;
  else
    return false;
}
inline bool greaterThanEqual(double a, double b) {
  if (a + eps > b)
    return true;
  else
    return false;
}
struct edge {
  int p, q, w;
};
bool cmp(edge &a, edge &b) { return a.w < b.w; }
string to_s(int t) {
  stringstream ss;
  ss << t;
  return ss.str();
}
template <typename first, typename second>
ostream &operator<<(ostream &os, const pair<first, second> &p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "{";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "}";
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename T>
ostream &operator<<(ostream &os, const multiset<T> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename first, typename second>
ostream &operator<<(ostream &os, const map<first, second> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << it->first << " = " << it->second;
  }
  return os << "]";
}
clock_t tStart = clock();
void faltu() { cerr << '\n'; }
template <typename T>
void faltu(T a[], int n) {
  for (int i = 0; i < n; ++i) cerr << a[i] << ' ';
  cerr << '\n';
}
template <typename T, typename... hello>
void faltu(T arg, const hello &...rest) {
  cerr << arg << ' ';
  faltu(rest...);
}
vector<pair<double, double> > vec;
map<int, map<int, int> > mp;
double area4(double x1, double y1, double x2, double y2, double x3, double y3,
             double x4, double y4) {
  double a = x1 * y2 + x2 * y3 + x3 * y4 + x4 * y1;
  double b = x2 * y1 + x3 * y2 + x4 * y3 + x1 * y4;
  double temp = abs(a - b) / 2.0;
  return temp;
}
double area3(double x1, double y1, double x2, double y2, double x3, double y3) {
  double a = x1 * y2 + x2 * y3 + x3 * y1;
  double b = x2 * y1 + x3 * y2 + x1 * y3;
  double temp = abs(a - b) / 2.0;
  return temp;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int ok = 0;
  for (int i = 0; i < 8; i++) {
    double p1, p2;
    cin >> p1 >> p2;
    vec.push_back(make_pair(p1, p2));
    mp[p1][p2] = i + 1;
  }
  sort((vec).begin(), (vec).end());
  do {
    double Area =
        area4(vec[0].first, vec[0].second, vec[1].first, vec[1].second,
              vec[2].first, vec[2].second, vec[3].first, vec[3].second);
    if (1) {
      double dia1 =
          coDist(vec[0].first, vec[0].second, vec[2].first, vec[2].second);
      double dia2 =
          coDist(vec[1].first, vec[1].second, vec[3].first, vec[3].second);
      double a1 =
          coDist(vec[0].first, vec[0].second, vec[1].first, vec[1].second);
      double a2 =
          coDist(vec[2].first, vec[2].second, vec[1].first, vec[1].second);
      double a3 =
          coDist(vec[2].first, vec[2].second, vec[3].first, vec[3].second);
      double a4 =
          coDist(vec[0].first, vec[0].second, vec[3].first, vec[3].second);
      if (equalTo(dia1, dia2) && equalTo(a1, a3) && equalTo(a2, a4) &&
          equalTo(a1, a2) && equalTo(a3, a4)) {
        double dia3 =
            coDist(vec[4].first, vec[4].second, vec[6].first, vec[6].second);
        double dia4 =
            coDist(vec[7].first, vec[7].second, vec[5].first, vec[5].second);
        double b1 =
            coDist(vec[4].first, vec[4].second, vec[5].first, vec[5].second);
        double b2 =
            coDist(vec[6].first, vec[6].second, vec[5].first, vec[5].second);
        double b3 =
            coDist(vec[6].first, vec[6].second, vec[7].first, vec[7].second);
        double b4 =
            coDist(vec[4].first, vec[4].second, vec[7].first, vec[7].second);
        if (equalTo(dia3, dia4) && equalTo(b1, b3) && equalTo(b2, b4)) {
          do {
            cerr << "1"
                 << " : ";
            faltu(1);
          } while (0);
          cout << "YES" << '\n';
          for (int i = 0; i < 4; i++)
            cout << mp[vec[i].first][vec[i].second] << " ";
          cout << '\n';
          for (int i = 4; i < 8; i++)
            cout << mp[vec[i].first][vec[i].second] << " ";
          return 0;
        }
      }
      if (equalTo(dia1, dia2) && equalTo(a1, a3) && equalTo(a2, a4)) {
        double dia3 =
            coDist(vec[4].first, vec[4].second, vec[6].first, vec[6].second);
        double dia4 =
            coDist(vec[7].first, vec[7].second, vec[5].first, vec[5].second);
        double b1 =
            coDist(vec[4].first, vec[4].second, vec[5].first, vec[5].second);
        double b2 =
            coDist(vec[6].first, vec[6].second, vec[5].first, vec[5].second);
        double b3 =
            coDist(vec[6].first, vec[6].second, vec[7].first, vec[7].second);
        double b4 =
            coDist(vec[4].first, vec[4].second, vec[7].first, vec[7].second);
        if (equalTo(dia3, dia4) && equalTo(b1, b3) && equalTo(b2, b4) &&
            equalTo(b1, b2) && equalTo(b3, b4)) {
          do {
            cerr << "2"
                 << " : ";
            faltu(2);
          } while (0);
          cout << "YES" << '\n';
          for (int i = 4; i < 8; i++)
            cout << mp[vec[i].first][vec[i].second] << " ";
          cout << '\n';
          for (int i = 0; i < 4; i++)
            cout << mp[vec[i].first][vec[i].second] << " ";
          return 0;
        }
      }
    }
  } while (next_permutation((vec).begin(), (vec).end()));
  cout << "NO" << '\n';
}