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;
bool InRangeR(int r, int R) { return (r > 0 && r <= R); }
bool InRangeC(int c, int C) { return (c > 0 && c <= C); }
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
int MCM(int a, int b) { return a * b / GCD(a, b); }
int MIN2N(int a, int b) {
  if (a <= b) return a;
  return b;
}
int MAX2N(int a, int b) {
  if (a >= b) return a;
  return b;
}
int INTABS(int a, int b) {
  if (a >= b) return a - b;
  return b - a;
}
int MIN3N(int a, int b, int c) {
  if (a <= b && a <= c) return a;
  if (b <= c) return b;
  return c;
}
int MAX3N(int a, int b, int c) {
  if (a >= b && a >= c) return a;
  if (b >= c) return b;
  return c;
}
long long LONGGCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long LONGMCM(long long a, long long b) { return a * b / GCD(a, b); }
long long LONGMIN2N(long long a, long long b) {
  if (a <= b) return a;
  return b;
}
long long LONGMAX2N(long long a, long long b) {
  if (a >= b) return a;
  return b;
}
long long LONGABS(long long a, long long b) {
  if (a >= b) return a - b;
  return b - a;
}
long long LONGMIN3N(long long a, long long b, long long c) {
  if (a <= b && a <= c) return a;
  if (b <= c) return b;
  return c;
}
long long LONGMAX3N(long long a, long long b, long long c) {
  if (a >= b && a >= c) return a;
  if (b >= c) return b;
  return c;
}
double DOUBLEABS(double a, double b) {
  if (a >= b) return a - b;
  return b - a;
}
double PI = 2 * acos(0);
double mag(double v) { return v * v; }
double deg2rad(double grad) { return grad * PI / 180; }
double rad2deg(double grad) { return grad * 180 / PI; }
int MAGDST(int x, int y, int ax, int ay) {
  int tmp = (x - ax) * (x - ax) + (y - ay) * (y - ay);
  return tmp;
}
double DST(double x, double y, double ax, double ay) {
  double tmp = (x - ax) * (x - ax) + (y - ay) * (y - ay);
  return sqrt(tmp);
}
bool* m_criba;
void criba(bool*& m, int tam) {
  m = new bool[tam + 1];
  m[0] = m[1] = false;
  for (int i = 2; i <= tam; ++i) m[i] = true;
  for (int i = 2; i * i <= tam; ++i)
    if (m[i])
      for (int h = 2; i * h <= tam; ++h) m[i * h] = false;
}
struct str {
  int L;
  char C[1005];
  bool operator<(const str& S) const { return L < S.L; }
};
str GCAD[1005];
bool CMP(str a, str b) { return a.L < b.L; }
bool CMPSTR(int x, int px, int y, int py, int cnt) {
  for (int p = (0); p <= (cnt - 1); p += (1))
    if (GCAD[x].C[px + p] != GCAD[y].C[py + p]) return false;
  return true;
}
bool isXinY(int x, int y) {
  for (int p = (0); p <= (GCAD[y].L - GCAD[x].L); p += (1))
    if (CMPSTR(x, 0, y, p, GCAD[x].L)) return true;
  return false;
}
bool IsPal(char* line, int posi, int posd) {
  for (int izq = posi, der = posd; izq < der; izq++, der--)
    if (line[izq] != line[der]) return false;
  return true;
}
void ReverseCAD(char* line, int posi, int posd) {
  for (int izq = posi, der = posd; izq < der; izq++, der--) {
    char cc = line[izq];
    line[izq] = line[der];
    line[der] = cc;
  }
}
void ReverseArr(int* arr, int posi, int posd) {
  for (int izq = posi, der = posd; izq < der; izq++, der--) {
    int cc = arr[izq];
    arr[izq] = arr[der];
    arr[der] = cc;
  }
}
int ReverseBIN(int N, int gbit) {
  int S = 0;
  for (int p = (0); p <= (gbit); p += (1))
    if (N & (1 << p)) S += (1 << (gbit - p));
  return S;
}
int ChangeCharByINT(char* num) {
  int tmp = 0;
  int large = strlen(num) - 1;
  if (num[0] != '-') {
    for (int p = (0); p <= (large); p += (1)) tmp = 10 * tmp + (num[p] - '0');
  } else {
    for (int p = (1); p <= (large); p += (1)) tmp = 10 * tmp + (num[p] - '0');
    tmp *= -1;
  }
  return tmp;
}
int X[9], Y[9], SQ, SQA, SQB, RE, A[9], CA, CB, TA[5], TB[5];
bool SQUARE(int* arr) {
  int PER[5] = {0, 1, 2, 3, 4};
  for (int p = (1); p <= (24); p += (1)) {
    if (MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[2]]],
               Y[arr[PER[2]]]) == MAGDST(X[arr[PER[3]]], Y[arr[PER[3]]],
                                         X[arr[PER[4]]], Y[arr[PER[4]]]) &&
        MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[3]]],
               Y[arr[PER[3]]]) == MAGDST(X[arr[PER[2]]], Y[arr[PER[2]]],
                                         X[arr[PER[4]]], Y[arr[PER[4]]]) &&
        MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[2]]],
               Y[arr[PER[2]]]) == MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]],
                                         X[arr[PER[3]]], Y[arr[PER[3]]]) &&
        MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[4]]],
               Y[arr[PER[4]]]) == MAGDST(X[arr[PER[2]]], Y[arr[PER[2]]],
                                         X[arr[PER[3]]], Y[arr[PER[3]]]) &&
        MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[2]]], Y[arr[PER[2]]]) >
            0 &&
        MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[3]]], Y[arr[PER[3]]]) >
            0)
      return true;
    next_permutation(PER + 1, PER + 5);
  }
  return false;
}
bool RECTANGLE(int* arr) {
  int PER[5] = {0, 1, 2, 3, 4};
  for (int p = (1); p <= (24); p += (1)) {
    if (MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[2]]],
               Y[arr[PER[2]]]) == MAGDST(X[arr[PER[3]]], Y[arr[PER[3]]],
                                         X[arr[PER[4]]], Y[arr[PER[4]]]) &&
        MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[3]]],
               Y[arr[PER[3]]]) == MAGDST(X[arr[PER[2]]], Y[arr[PER[2]]],
                                         X[arr[PER[4]]], Y[arr[PER[4]]]) &&
        MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[4]]],
               Y[arr[PER[4]]]) == MAGDST(X[arr[PER[2]]], Y[arr[PER[2]]],
                                         X[arr[PER[3]]], Y[arr[PER[3]]]) &&
        MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[2]]], Y[arr[PER[2]]]) >
            0 &&
        MAGDST(X[arr[PER[1]]], Y[arr[PER[1]]], X[arr[PER[3]]], Y[arr[PER[3]]]) >
            0)
      return true;
    next_permutation(PER + 1, PER + 5);
  }
  return false;
}
void SOLVE() {
  for (int A1 = (1); A1 <= (2); A1 += (1))
    for (int A2 = (1); A2 <= (2); A2 += (1))
      for (int A3 = (1); A3 <= (2); A3 += (1))
        for (int A4 = (1); A4 <= (2); A4 += (1))
          for (int A5 = (1); A5 <= (2); A5 += (1))
            for (int A6 = (1); A6 <= (2); A6 += (1))
              for (int A7 = (1); A7 <= (2); A7 += (1))
                for (int A8 = (1); A8 <= (2); A8 += (1)) {
                  A[1] = A1;
                  A[2] = A2;
                  A[3] = A3;
                  A[4] = A4;
                  A[5] = A5;
                  A[6] = A6;
                  A[7] = A7;
                  A[8] = A8;
                  SQA = SQB = SQ = RE = CA = CB = 0;
                  for (int p = (1); p <= (8); p += (1)) {
                    if (1 == A[p]) {
                      CA++;
                      TA[CA] = p;
                    } else if (2 == A[p]) {
                      CB++;
                      TB[CB] = p;
                    }
                  }
                  if (CA == CB) {
                    if (SQUARE(TA)) {
                      SQA = 1;
                      SQ++;
                      RE++;
                    } else if (RECTANGLE(TA))
                      RE++;
                    if (SQUARE(TB)) {
                      SQB = 1;
                      SQ++;
                      RE++;
                    } else if (RECTANGLE(TB))
                      RE++;
                    if (SQ == 2) {
                      printf("YES\n");
                      for (int p = (1); p <= (4); p += (1))
                        printf("%d ", TA[p]);
                      for (int p = (1); p <= (4); p += (1))
                        printf("%d ", TB[p]);
                      return;
                    } else if (SQ == 1 && RE == 2) {
                      printf("YES\n");
                      if (SQA == 1) {
                        for (int p = (1); p <= (4); p += (1))
                          printf("%d ", TA[p]);
                        for (int p = (1); p <= (4); p += (1))
                          printf("%d ", TB[p]);
                      } else {
                        for (int p = (1); p <= (4); p += (1))
                          printf("%d ", TB[p]);
                        for (int p = (1); p <= (4); p += (1))
                          printf("%d ", TA[p]);
                      }
                      return;
                    }
                  }
                }
  printf("NO");
}
int main() {
  for (int p = (1); p <= (8); p += (1)) scanf("%d%d", &X[p], &Y[p]);
  SOLVE();
}