Kostya is a genial sculptor, he has an idea: to carve a marble sculpture in the shape of a sphere. Kostya has a friend Zahar who works at a career. Zahar knows about Kostya's idea and wants to present him a rectangular parallelepiped of marble from which he can carve the sphere. 

Zahar has *n* stones which are rectangular parallelepipeds. The edges sizes of the *i*-th of them are *a*<sub class="lower-index">*i*</sub>, *b*<sub class="lower-index">*i*</sub> and *c*<sub class="lower-index">*i*</sub>. He can take no more than two stones and present them to Kostya. 

If Zahar takes two stones, he should glue them together on one of the faces in order to get a new piece of rectangular parallelepiped of marble. Thus, it is possible to glue a pair of stones together if and only if two faces on which they are glued together match as rectangles. In such gluing it is allowed to rotate and flip the stones in any way. 

Help Zahar choose such a present so that Kostya can carve a sphere of the maximum possible volume and present it to Zahar.
The first line contains the integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>).

*n* lines follow, in the *i*-th of which there are three integers *a*<sub class="lower-index">*i*</sub>, *b*<sub class="lower-index">*i*</sub> and *c*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub>, *b*<sub class="lower-index">*i*</sub>, *c*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — the lengths of edges of the *i*-th stone. Note, that two stones may have exactly the same sizes, but they still will be considered two different stones.
In the first example we can connect the pairs of stones:
 -  2 and 4, the size of the parallelepiped: 3 × 2 × 5, the radius of the inscribed sphere 1 -  2 and 5, the size of the parallelepiped: 3 × 2 × 8 or 6 × 2 × 4 or 3 × 4 × 4, the radius of the inscribed sphere 1, or 1, or 1.5 respectively. -  2 and 6, the size of the parallelepiped: 3 × 5 × 4, the radius of the inscribed sphere 1.5 -  4 and 5, the size of the parallelepiped: 3 × 2 × 5, the radius of the inscribed sphere 1 -  5 and 6, the size of the parallelepiped: 3 × 4 × 5, the radius of the inscribed sphere 1.5 
Or take only one stone:
 -  1 the size of the parallelepiped: 5 × 5 × 5, the radius of the inscribed sphere 2.5 -  2 the size of the parallelepiped: 3 × 2 × 4, the radius of the inscribed sphere 1 -  3 the size of the parallelepiped: 1 × 4 × 1, the radius of the inscribed sphere 0.5 -  4 the size of the parallelepiped: 2 × 1 × 3, the radius of the inscribed sphere 0.5 -  5 the size of the parallelepiped: 3 × 2 × 4, the radius of the inscribed sphere 1 -  6 the size of the parallelepiped: 3 × 3 × 4, the radius of the inscribed sphere 1.5 
It is most profitable to take only the first stone.
6
5 5 5
3 2 4
1 4 1
2 1 3
3 2 4
3 3 4
1
1
7
10 7 8
5 10 3
4 2 6
5 5 5
10 2 8
4 2 1
7 7 7
2
1 5
1
1 1 1
1
1
2
2 3 1
2 2 3
2
2 1
1
1000000000 1000000000 1000000000
1
1
3
100 100 100
25 63 11
63 15 11
1
1
2
999999999 1000000000 1000000000
1000000000 1000000000 1000000000
2
2 1
3
1 1 2
1 2 2
1 1 1
1
1
3
500 1000 1000
1000 499 1000
999 999 999
2
1 2
3
500 1000 1000
1000 499 1000
1000 1001 1001
1
3
9
1 3 2
3 3 1
3 1 2
3 3 2
2 2 2
3 2 1
3 3 1
3 3 1
2 1 2
2
4 8
3
20 30 5
20 30 6
10 10 10
2
2 1
3
5 20 30
6 20 30
10 10 10
2
2 1
3
20 5 30
20 6 30
10 10 10
2
2 1
3
20 30 5
30 20 6
10 10 10
2
2 1
3
20 30 5
6 20 30
10 10 10
2
2 1
3
20 30 5
6 30 20
10 10 10
2
2 1
3
20 30 5
20 6 30
10 10 10
2
2 1
3
20 30 5
30 6 20
10 10 10
2
2 1
3
20 5 30
20 30 6
10 10 10
2
2 1
3
20 5 30
30 20 6
10 10 10
2
2 1
3
20 5 30
6 20 30
10 10 10
2
2 1
3
20 5 30
6 30 20
10 10 10
2
2 1
3
20 5 30
30 6 20
10 10 10
2
2 1
3
5 20 30
20 30 6
10 10 10
2
2 1
3
5 20 30
30 20 6
10 10 10
2
2 1
3
5 20 30
6 30 20
10 10 10
2
2 1
3
5 20 30
20 6 30
10 10 10
2
2 1
3
5 20 30
30 6 20
10 10 10
2
2 1
# Inspired by Picasso's "Girl on the ball",
# sculptor Vassily wants to carve a large ball1. He needs a stone block for that, and goes to a stone warehouse.
# There he finds a vast array of stones, all of them are rectangular boxes (rectangular parallelepipeds) of various sizes.
# Since Vassily wants to carve the largest ball possible,
# one simple option is to choose a stone box with the maximum value of the smallest dimension
# (e.g. box with dimensions 45×40×60 allows carving a ball of diameter 40).
# However, there is also another option: Vassily can choose two boxes (but not more)
# and glue them together to produce a larger box. He can only do that if the two boxes
# have an identical rectangular face: for example,
# he can glue up boxes of dimensions 70×80×50 and 80×40×70 to obtain a box of dimensions 70×80×90.
#  (Note that it is possible to turn boxes around. Note also that each box is available in one copy,
# that is it is not possible to glue a box "with itself".)
# There are too many boxes to choose from and Vassily does not know how to make
# the best choice to make the largest possible ball.
# He is an artist who never studied algorithms and never heard about hashing.
# Write a program efficiently helping Vassily to choose one or two boxes.
#  "Efficiency" here means that your solution should avoid sorting or searching of large arrays of numbers
# and should preferably process boxes online.

# Input:

# Input file named input.txt is formatted as follows:
# The first line holds the number of boxes n (1≤n≤10^5).
# It is followed by n lines, line i storing the dimensions of the i-th box: 3 integers separated by a space.


# Output:
# Output file named output.txt should have three lines:
# The 1st line holds the number of chosen boxes (1 or 2)
# The 2nd line holds the index(es) of chosen box(es): either one or two numbers between 1 and n separated by a space.
# Indexes of two boxes are written in increasing order
# The 3rd line holds the diameter of the ball


class MyCoolHashTable:

    def __init__(self, n):
        self.table = [[] for i in range(n)]

    def get_group(self, key):
        index = self.get_index(key)
        return self.table[index]

    def add_elem(self, tupl: tuple):

        # We are forming tuples for insertion, in following format
        # (dim, dim, dim to add, index)
        tupls = list(set([(tupl[0], tupl[1], tupl[2], tupl[3]),
                          (tupl[0], tupl[2], tupl[1], tupl[3]),
                          (tupl[1], tupl[2], tupl[0], tupl[3])]))

        for tup in tupls:
            index = self.get_index(tup)
            elems = self.table[index]

            if(len(elems) > 0):
                flag = False
                for i in range(len(elems)):
                    if elems[i][2] >= tup[2]:
                        elems.insert(i, tup)
                        flag = True
                        # We will take into case last two elements of array
                        # So previous elements only take computation time, and we don't need them
                        if(len(elems) == 3):
                            del elems[0]
                        break
                if flag == False:
                    elems.append(tup)
            else:
                elems.append(tup)

    def get_index(self, keys) -> int:
        return (((keys[0] + keys[1])*(keys[0] + keys[1] + 1))//2 + keys[1]) % len(self.table)


def read_input():

    # file = open('input.txt', 'r')

    N = int(input())

    hash_map = MyCoolHashTable(10 * N)

    # We are creating tuples (d, d, d, i), where d is one dimnesion, and i is index
    # dimensions are sorted
    for i in range(0, N):
        temp_string = input().split(' ')
        temp = list(map(int, temp_string))
        temp.sort()
        temp.append(i + 1)
        tupl = tuple(temp)
        hash_map.add_elem(tupl)

    return hash_map


if __name__ == '__main__':

    hash_map = read_input()

    best_solution = (0, 0, 0)
    best_indices = 0

    for elems in hash_map.table:
        size = len(elems)
        if(size == 1):
            tupl = elems[0]
            current_candidate = (tupl[0], tupl[1], tupl[2])
            current_indices = (tupl[3],)

            if(min(current_candidate) >= min(best_solution)):
                best_solution = current_candidate
                best_indices = current_indices

        elif(size > 1):
            tupl_1 = elems[size - 1]
            tupl_2 = elems[size - 2]

            current_candidate = (tupl_1[0], tupl_1[1], tupl_1[2] + tupl_2[2])

            temp = [tupl_1[3], tupl_2[3]]
            temp.sort()
            current_indices = tuple(temp)

            if(min(current_candidate) >= min(best_solution)):
                best_solution = current_candidate
                best_indices = current_indices

    if len(best_indices) == 1:
        str_indices = '{}'.format(best_indices[0])
    else:
        str_indices = '{} {}'.format(best_indices[0], best_indices[1])

    # final_str = '{}\n{}\n{}'.format(
    #     len(best_indices), str_indices, min(best_solution))

    final_str = '{}\n{}'.format(
        len(best_indices), str_indices)

    # file = open('output.txt', 'w')
    # file.write(final_str)
    # file.close()

    print(final_str)
