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 long long int mod = 1e9 + 7;
long long int gcd(long long int a, long long int b) {
  if (b < a) {
    int temp = a;
    a = b;
    b = temp;
  }
  if (a == 0) {
    return b;
  }
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return (a * b / gcd(a, b));
}
vector<long long int> getprimes() {
  vector<long long int> pl(101, 1);
  for (int i = 2; i <= 100; i++) {
    if (pl[i] == 1) {
      for (int j = 2 * i; j <= 100; j += i) {
        pl[j] = 0;
      }
    }
  }
  return pl;
}
long long int primefactorise(int n) {
  if (n == 1) {
    return 1;
  }
  long long int ans = n;
  while (n % 2 == 0) {
    n = n / 2;
    if (n != 1) {
      ans += n;
    }
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      n = n / i;
      if (n != 1) {
        ans += n;
      }
    }
  }
  ans += 1;
  return ans;
}
long long int power(long long int a, long long int b) {
  long long int ans = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      ans *= a;
      ans = ans % mod;
    }
    b /= 2;
    a *= a;
    a = a % mod;
  }
  return ans % mod;
}
vector<long long int> getbinary(long long int first) {
  vector<long long int> bin(8, 0);
  long long int iter = 0;
  while (first > 0) {
    if (first % 2 == 0) {
      bin[iter] = 0;
    } else {
      bin[iter] = 1;
    }
    first /= 2;
    iter++;
  }
  return bin;
}
long long int dist(pair<long long int, long long int> a,
                   pair<long long int, long long int> b) {
  return (b.first - a.first) * (b.first - a.first) +
         (b.second - a.second) * (b.second - a.second);
}
long long int check(pair<long long int, long long int> a,
                    pair<long long int, long long int> b,
                    pair<long long int, long long int> c,
                    pair<long long int, long long int> d) {
  long long int d1, d2, d3, d4, d5, d6;
  d1 = dist(a, b);
  d2 = dist(b, c);
  d3 = dist(c, d);
  d4 = dist(a, d);
  d5 = dist(a, c);
  d6 = dist(b, d);
  unordered_map<long long int, long long int> m;
  set<long long int> s;
  m[d1]++;
  m[d2]++;
  m[d3]++;
  m[d4]++;
  m[d5]++;
  m[d6]++;
  s.insert(d1);
  s.insert(d2);
  s.insert(d3);
  s.insert(d4);
  s.insert(d5);
  s.insert(d6);
  if (s.size() == 2) {
    long long int o, t;
    for (auto e : m) {
      if (e.second == 4) {
        o = e.first;
      } else if (e.second == 2) {
        t = e.first;
      } else {
        return 0;
      }
    }
    if (2 * o == t) {
      return 1;
    }
  }
  if (s.size() == 3) {
    long long int o = -1, t = -1, th = -1;
    for (auto e : m) {
      if (e.second == 2) {
        if (o == -1) {
          o = e.first;
        } else if (t == -1) {
          t = e.first;
        } else {
          th = e.first;
        }
      } else {
        return 0;
      }
    }
    if (o + t == th || o + th == t || th + t == o) {
      return 2;
    }
  }
  return 0;
  s.clear();
  m.clear();
}
long long int notinline(pair<long long int, long long int> a,
                        pair<long long int, long long int> b,
                        pair<long long int, long long int> c,
                        pair<long long int, long long int> d) {
  pair<long long int, long long int> pts[4] = {a, b, c, d};
  long long int zero = 0;
  unordered_map<double, long long int> m;
  for (int i = 0; i < 4; i++) {
    for (int j = i + 1; j < 4; j++) {
      if (pts[j].first - pts[i].first == 0) {
        zero++;
      } else {
        m[((double)(pts[j].second) - (double)(pts[i].second)) * 1.0 /
          ((double)(pts[j].first) - (double)(pts[i].first)) * 1.0]++;
      }
    }
  }
  if (zero > 2) {
    return 0;
  }
  for (auto e : m) {
    if (e.second > 2) {
      return 0;
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(20);
  pair<long long int, long long int> a[8];
  for (int i = 0; i < 8; i++) {
    cin >> a[i].first >> a[i].second;
  }
  long long int temp = power(2, 8);
  for (int i = 1; i < temp; i++) {
    vector<long long int> bin = getbinary(i);
    long long int count = 0;
    for (int i = 0; i < 8; i++) {
      if (bin[i] == 1) {
        count++;
      }
    }
    if (count == 4) {
      vector<pair<long long int, long long int> > fir, sec;
      for (int i = 0; i < 8; i++) {
        if (bin[i] == 1) {
          fir.push_back(a[i]);
        } else {
          sec.push_back(a[i]);
        }
      }
      if (notinline(fir[0], fir[1], fir[2], fir[3]) &&
          notinline(sec[0], sec[1], sec[2], sec[3])) {
        if (check(fir[0], fir[1], fir[2], fir[3]) == 1) {
          if (check(sec[0], sec[1], sec[2], sec[3]) != 0) {
            cout << "YES\n";
            for (int i = 0; i < 8; i++) {
              if (bin[i] == 1) {
                cout << i + 1 << " ";
              }
            }
            cout << endl;
            for (int i = 0; i < 8; i++) {
              if (bin[i] == 0) {
                cout << i + 1 << " ";
              }
            }
            cout << endl;
            return 0;
          }
        } else if (check(sec[0], sec[1], sec[2], sec[3]) == 1) {
          if (check(fir[0], fir[1], fir[2], fir[3]) != 0) {
            cout << "YES\n";
            for (int i = 0; i < 8; i++) {
              if (bin[i] == 0) {
                cout << i + 1 << " ";
              }
            }
            cout << endl;
            for (int i = 0; i < 8; i++) {
              if (bin[i] == 1) {
                cout << i + 1 << " ";
              }
            }
            cout << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << "NO\n";
}