Problem: 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 ai, bi and ci. 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.

Input

The first line contains the integer n (1 ≤ n ≤ 105).

n lines follow, in the i-th of which there are three integers ai, bi and ci (1 ≤ ai, bi, ci ≤ 109) — 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.

Output

In the first line print k (1 ≤ k ≤ 2) the number of stones which Zahar has chosen. In the second line print k distinct integers from 1 to n — the numbers of stones which Zahar needs to choose. Consider that stones are numbered from 1 to n in the order as they are given in the input data.

You can print the stones in arbitrary order. If there are several answers print any of them. 

Examples

Input

6
5 5 5
3 2 4
1 4 1
2 1 3
3 2 4
3 3 4


Output

1
1


Input

7
10 7 8
5 10 3
4 2 6
5 5 5
10 2 8
4 2 1
7 7 7


Output

2
1 5

Note

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. 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
int64_t mod = 10007;
int64_t Min(int64_t a, int64_t b) { return (b < a) ? b : a; }
template <class T>
void Swap(T &a, T &b) {
  T c(std::move(a));
  a = std::move(b);
  b = std::move(c);
}
struct first_two {
  first_two() = default;
  first_two(int64_t first, int64_t second) : first(first), second(second) {}
  bool operator==(const first_two &rhs) const {
    return (first == rhs.first) && (second == rhs.second);
  }
  int64_t first = -1;
  int64_t second = -1;
};
struct max_two {
  max_two() = default;
  max_two(first_two key, int64_t third, int64_t box_id)
      : key(key), third1(third), id1(box_id){};
  void update_max(int64_t value, int64_t id) {
    if (value > third1) {
      third2 = third1;
      id2 = id1;
      third1 = value;
      id1 = id;
    } else if (value > third2) {
      third2 = value;
      id2 = id;
    }
  }
  int64_t get_radius() {
    if (third2 == -1 || Min(key.first, third1) == key.first) {
      return Min(key.first, third1);
    }
    return Min(key.first, third1 + third2);
  }
  int64_t get_cnt() {
    if (third2 == -1 || Min(key.first, third1) == key.first) {
      return 1;
    }
    return 2;
  }
  first_two key;
  int64_t third1 = -1, third2 = -1;
  int64_t id1, id2;
};
void divide_in_key_and_value(int64_t &key1, int64_t &key2, int64_t &value) {
  if (key1 > value) Swap(key1, value);
  if (key1 > key2) Swap(key1, key2);
  if (key2 > value) Swap(key2, value);
}
int64_t hash_function(unsigned int a, unsigned int b) {
  return ((3 * a) % mod + 5 * (b + 1) % mod) % mod;
}
void insert_value_in_hash_map(std::vector<std::vector<max_two>> &hash_map,
                              int64_t key1, int64_t key2, int64_t value,
                              int64_t box_id, int64_t &current_max,
                              int64_t &id_best_i, int64_t &id_best_j) {
  int64_t id_in_hash = hash_function(key1, key2);
  first_two current_key(key1, key2);
  for (int64_t j = 0; j < hash_map[id_in_hash].size(); ++j) {
    if (hash_map[id_in_hash][j].key == current_key) {
      hash_map[id_in_hash][j].update_max(value, box_id);
      if (hash_map[id_in_hash][j].get_radius() > current_max) {
        current_max = hash_map[id_in_hash][j].get_radius();
        id_best_i = id_in_hash;
        id_best_j = j;
      }
      return;
    }
  }
  max_two new_dimentions(current_key, value, box_id);
  hash_map[id_in_hash].push_back(new_dimentions);
  if (new_dimentions.get_radius() > current_max) {
    current_max = new_dimentions.get_radius();
    id_best_i = id_in_hash;
    id_best_j = hash_map[id_in_hash].size() - 1;
  }
}
void insert_box_in_hash_map(std::vector<std::vector<max_two>> &hash_map,
                            int64_t first, int64_t second, int64_t third,
                            int64_t box_id, int64_t &current_max,
                            int64_t &id_best_i, int64_t &id_best_j) {
  if (first != second && second != third && first != third) {
    insert_value_in_hash_map(hash_map, first, second, third, box_id,
                             current_max, id_best_i, id_best_j);
    insert_value_in_hash_map(hash_map, second, third, first, box_id,
                             current_max, id_best_i, id_best_j);
    insert_value_in_hash_map(hash_map, first, third, second, box_id,
                             current_max, id_best_i, id_best_j);
    return;
  }
  if (first == second && second == third) {
    insert_value_in_hash_map(hash_map, first, second, third, box_id,
                             current_max, id_best_i, id_best_j);
    return;
  }
  if (first == second) {
    insert_value_in_hash_map(hash_map, first, second, third, box_id,
                             current_max, id_best_i, id_best_j);
    insert_value_in_hash_map(hash_map, first, third, second, box_id,
                             current_max, id_best_i, id_best_j);
    return;
  }
  if (first == third) {
    insert_value_in_hash_map(hash_map, first, second, third, box_id,
                             current_max, id_best_i, id_best_j);
    insert_value_in_hash_map(hash_map, first, third, second, box_id,
                             current_max, id_best_i, id_best_j);
    return;
  }
  if (second == third) {
    insert_value_in_hash_map(hash_map, first, second, third, box_id,
                             current_max, id_best_i, id_best_j);
    insert_value_in_hash_map(hash_map, second, third, first, box_id,
                             current_max, id_best_i, id_best_j);
    return;
  }
}
int main() {
  std::vector<std::vector<max_two>> hash_map(mod);
  int64_t cnt_boxes;
  std::cin >> cnt_boxes;
  int64_t first, second, third;
  int64_t current_max = -1;
  int64_t id_best_i, id_best_j;
  for (int64_t i = 0; i < cnt_boxes; ++i) {
    std::cin >> first >> second >> third;
    divide_in_key_and_value(first, second, third);
    insert_box_in_hash_map(hash_map, first, second, third, i + 1, current_max,
                           id_best_i, id_best_j);
  }
  if (hash_map[id_best_i][id_best_j].get_cnt() == 1) {
    std::cout << 1 << "\n" << hash_map[id_best_i][id_best_j].id1;
  } else {
    std::cout << 2 << "\n"
              << hash_map[id_best_i][id_best_j].id1 << " "
              << hash_map[id_best_i][id_best_j].id2;
  }
  return 0;
}