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 PYTHON):

Solution:
from sys import stdin
from itertools import permutations, combinations
from math import degrees, atan2


class Point:
    def add(self, p1, p2, dist=1):
        return [p1[0] + p2[0] * dist, p1[1] + p2[1] * dist]

    def sub(self, p1, p2):
        return [p2[0] - p1[0], p2[1] - p1[1]]

    # dot==0 if v1 perpendicular
    def dot_mul(self, p1, p2):
        return p1[0] * p2[0] + p1[1] * p2[1]

    # cross==0 if <v1v2=0 elif cross<0 then right perpendicular else left perpendicular
    def cross_mul(self, p1, p2):
        return p1[0] * p2[1] - p2[0] * p1[1]

    def unit(self, p1, p2, dist):
        return [(p2[0] - p1[0]) / dist, (p2[1] - p1[1]) / dist]

    def collinear(self, p1, p2, p3):
        return abs(self.cross_mul(self.sub(p1, p2), self.sub(p1, p3))) < Eps

    def in_ray(self, p1, p2, p3):
        return self.collinear(p1, p2, p3) and self.dot_mul(self.sub(p1, p2), self.sub(p1, p3)) >= 0

    def in_segment(self, p1, p2, p3):
        return self.in_ray(p1, p2, p3) or self.in_ray(p2, p1, p3)

    def dist_to_line(self, p1, p2, p3):
        return abs(self.cross_mul(self.sub(p1, p2), self.sub(p1, p3)) / (dist2d([0, 0], self.sub(p1, p2))))

    def slop(self, p1, p2):
        try:
            return (p2[1] - p1[1]) / (p2[0] - p1[0])
        except:
            return float('inf')

    def x_slope(self, p):
        return (360 + degrees(atan2(p[1], p[0]))) % 360

    def triangle_area(self, p1, p2, p3):
        return abs((p1[0] * (p2[1] - p3[1]) + p2[0] * (p3[1] - p1[1]) + p3[0] * (p1[1] - p2[1])) / 2)


dist2d = lambda p1, p2: (pow(p1[0] - p2[0], 2) + pow(p1[1] - p2[1], 2))
rints = lambda: [int(x) for x in stdin.readline().split()]
rints_2d = lambda n: [rints() for _ in range(n)]
a, out, p = rints_2d(8), [], Point()

for per in permutations(range(8), 8):
    d, slp, perpen = [0] * 8, [0] * 8, [0] * 8

    for i in range(4):
        d[i] = dist2d(a[per[i]], a[per[(i + 1) % 4]])
        # slp[i] = p.x_slope(a[per[i]])
        v1 = p.sub(a[per[i]], a[per[(i - 1) % 4]])
        v2 = p.sub(a[per[i]], a[per[(i + 1) % 4]])
        perpen[i] = p.dot_mul(v1, v2)

    ran = [4, 5, 6, 7]
    for i in range(4):
        d[i + 4] = dist2d(a[per[ran[i]]], a[per[ran[(i + 1) % 4]]])
        # slp[i] = p.x_slope(a[per[ran[i]]])
        v1 = p.sub(a[per[ran[i]]], a[per[ran[(i - 1) % 4]]])
        v2 = p.sub(a[per[ran[i]]], a[per[ran[(i + 1) % 4]]])
        perpen[i + 4] = p.dot_mul(v1, v2)

    if not (d[0] == d[1] == d[2] == d[3]) or d[4] != d[6] or d[5] != d[7]:
        continue

    if any(perpen):
        continue
    per = [i + 1 for i in per]
    print('YES\n%s\n%s' % (' '.join(map(str, per[:4])), ' '.join(map(str, per[4:]))))
    exit()

print('NO')