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
# I took these from https://planetmath.org/goodhashtableprimes, these numbers
# should reduce the number of collisions
PRIMES = [23, 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317, 196613, 393241, 786433,
          1572869, 3145739, 6291469, 12582917, 25165843, 50331653, 100663319, 201326611, 402653189, 805306457,
          1610612741]


class HashTable:
    """
    This hash table will only work with integer pairs as keys. It will possibly be several times slower
    than the default Python implementation, since I will make no effort to replace lists by arrays,
    avoid long arithmetics in the hashing function, or otherwise optimize the performance. Conceptually
    though, this class is a real hash table without using any embedded associative arrays.
    """
    def __init__(self, m=PRIMES[0]):
        self.size = 0
        self.prime_index = 0
        self.buckets = [[] for _ in range(m)]
        self.m = m

    def __getitem__(self, item):
        item_hash = self._hash(item)
        for key, value in self.buckets[item_hash]:
            if key[0] == item[0] and key[1] == item[1]:
                return value

        raise KeyError

    def __setitem__(self, item, _value):
        item_hash = self._hash(item)

        for i, (key, value) in enumerate(self.buckets[item_hash]):
            if key[0] == item[0] and key[1] == item[1]:
                self.buckets[item_hash][i][1] = _value
                return

        self.buckets[item_hash].append([item, _value])
        self.size += 1
        if self._load_factor() > 0.75:
            self._rehash(up=True)

    def __delitem__(self, item):
        item_hash = self._hash(item)
        for i, (key, value) in enumerate(self.buckets[item_hash]):
            if key[0] == item[0] and key[1] == item[1]:
                self.buckets[item_hash].pop(i)

                self.size -= 1
                if self._load_factor() < 0.25 and self.m >= PRIMES[1]:
                    self._rehash(up=False)

                break

    def __contains__(self, item):
        item_hash = self._hash(item)
        for i, (key, value) in enumerate(self.buckets[item_hash]):
            if key[0] == item[0] and key[1] == item[1]:
                return True

        return False

    def __len__(self):
        return self.size

    def _load_factor(self):
        return self.size / self.m

    def _hash(self, key):
        # trivial but working
        return (3 * key[0] + key[1]) % self.m

    def _rehash(self, up=True):
        old_buckets = self.buckets
        if up:  # expansion to the next "good prime" size
            if self.prime_index < len(PRIMES) - 1:
                self.m = PRIMES[self.prime_index + 1]
                self.prime_index += 1
            else:
                self.m = 2 * self.m + 1
        else:  # contraction to the previous "good prime" size
            if (self.m // 2 + 1 < PRIMES[-1]) and self.m > PRIMES[-1]:
                self.m = PRIMES[-1]
                self.prime_index = len(PRIMES) - 1
            elif self.prime_index > 0:
                self.m = PRIMES[self.prime_index - 1]
                self.prime_index -= 1

        self.buckets = [[] for _ in range(self.m)]
        self.size = 0

        for bucket in old_buckets:
            for key, value in bucket:
                self[key] = value


if __name__ == '__main__':
    boxes = HashTable()

    with open('input.txt', 'r') as inp:
        box_count = int(inp.readline())
        max_ball_diameter = 0
        max_ball_indices = [0, -1]

        for i in range(box_count):
            c, b, a = sorted(map(int, inp.readline().split()))
            if (a, b) in boxes:
                edges, indices = boxes[(a, b)]
                if c > edges[0]:
                    edges = [c, edges[0]]
                    indices = [i, indices[0]]
                elif c > edges[1]:
                    edges = [edges[0], c]
                    indices = [indices[0], i]

                diameter_candidate = min(a, b, edges[0] + edges[1])
                if diameter_candidate > max_ball_diameter:
                    max_ball_indices = indices
                    max_ball_diameter = diameter_candidate
            else:
                boxes[(a, b)] = ([c, 0], [i, -1])
                if c > max_ball_diameter:
                    max_ball_diameter = c
                    max_ball_indices = [i, -1]

        max_ball_indices = sorted(max_ball_indices)

        with open('output.txt', 'w') as out:
            if max_ball_indices[0] == -1:
                out.write('1\n' + '{}\n'.format(max_ball_indices[1] + 1) + '{}'.format(max_ball_diameter))
            else:
                out.write('2\n' + '{} {}\n'.format(max_ball_indices[0] + 1, max_ball_indices[1] + 1) +
                          '{}'.format(max_ball_diameter))
