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

Solution:
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Stack;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.StringTokenizer;
import java.util.TreeSet;
public class cfvc15
{
	static BufferedReader reader;
    static StringTokenizer tokenizer;
    static void init(InputStream input) 
    {
        reader = new BufferedReader( new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }
    static String next() throws IOException
    {
        while ( ! tokenizer.hasMoreTokens() )
        {
            tokenizer = new StringTokenizer(reader.readLine() );
        }
        return tokenizer.nextToken();
    }
 
    static long nextInt() throws IOException 
    {
        return Long.parseLong( next() );
    }
	static PrintWriter writer;
	static void outit(OutputStream outputStream)
	{
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}
	static void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) 
		{
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}
 
	static void println(Object...objects) 
	{
		print(objects);
		writer.println();
	}
 
	static void close()
	{
		writer.close();
	}
 
	static void flush() {
		writer.flush();
	}
	public static void print_a(char[] a_p)
    {
    	for(char i : a_p)
    	{
    		print(i+" ") ;
    	}
//    	println() ;
    }
	static boolean [] prime ;
	static int [] fac ;
    public static void main(String [] args) throws IOException
    {
    	init(System.in) ;
    	outit(System.out) ;
//    	int t = (int) nextInt() ;
//    	for(int i =0 ; i<t ; i++)
    	output() ;
        flush();
        close();
    }
    static long mod = 1000000007 ;
	static HashMap<Pair,PriorityQueue<Pair>> hm  ;
    public static void output() throws IOException
    {
    	int n = (int)nextInt() ;
    	int [][] a = new int [n][3] ;
    	for(int i = 0 ;i<n ; i++)
    	{
    		a[i][0] = (int)nextInt() ;
    		a[i][1] = (int)nextInt() ;
    		a[i][2] = (int)nextInt() ;
    	}
    	hm = new HashMap<Pair,PriorityQueue<Pair>>() ;
    	for(int i = 0 ; i<n ; i++)
    	{
    		HashSet<Pair> check = new HashSet<Pair>() ;
    		for(int j = 0 ; j<3 ; j++)
    		{
    			int l = -1 ;
    			int r = -1 ;
    			if(a[i][j]<a[i][(j+1)%3])
    			{
    				l = a[i][j] ;
    				r = a[i][(j+1)%3] ;
    			}
    			else
    			{
    				l = a[i][(j+1)%3] ;
    				r = a[i][j] ;
    			}
    			Pair hs = new Pair(l,r) ;
    			if(!check.contains(hs))
    			{
    				add(hs,a[i][(j+2)%3],i) ;
    				check.add(hs) ;
    			}
    		}
    	}
    	int max = 0 ;
    	int no = 0 ;
    	String ans = "" ;
    	for(Pair hs : hm.keySet())
    	{
//    		println(hs.v1+" "+hs.v2) ;
    		int min = hs.v1 ;
    		min = Math.min(min,hs.v2) ;
    		PriorityQueue<Pair> pq = hm.get(hs) ; 
    		if(pq.size()==1)
    		{
    			Pair m = pq.poll() ;
    			int val = m.v1 ;
//    			println(val) ;
    			min = Math.min(min,val) ;
    			if(min>max)
    			{
    				no = 1 ;
    				max = min ;
    				ans = Integer.toString(m.v2+1);
    			}
    		}
    		else if(pq.size()>=2) 
    		{
    			Pair m1 = pq.poll() ;
    			Pair m2 = pq.poll();
    			int val = m1.v1+m2.v1 ;
//    			println(val) ;
    			min = Math.min(min,val) ;
    			if(min>max)
    			{
    				no = 2 ;
    				max = min ;
    				ans = Integer.toString(m1.v2+1)+" "+Integer.toString(m2.v2+1) ;
    			}
    		}
    	}
    	println(no) ;
    	println(ans) ;
    }
    static void add(Pair hs,int val ,int ind)
    {
    	if(hm.containsKey(hs))
    	{
    		hm.get(hs).add(new Pair(val,ind)) ;
    	}
    	else
    	{
    		hm.put(hs, new PriorityQueue<Pair>());
    		hm.get(hs).add(new Pair(val,ind)) ;
    	}
    }
    static class Pair implements Comparable<Pair>
    {
    	int v1 ;
    	int v2 ;
    	Pair(int a,int b)
    	{
    		v1 = a ;
    		v2 = b ;
    	}
    	public int get1()
    	{
    		return v1 ;
    	}
    	public int get2()
    	{
    		return v2 ;
    	}
    	@Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Pair)) return false;
            Pair key = (Pair) o;
            return v1 == key.v1 && v2 == key.v2;
        }
        @Override
        public int hashCode() 
        {
            int result = v1;
            result = 37 * result + v2;
            return result;
        }
		@Override
		public int compareTo(Pair o) 
		{
			if(o.v1>this.v1)
			{
				return 1 ;
			}
			else if(o.v1==this.v1)
			{
				return 0 ;
			}
			else
			{
				return -1 ;
			}
		}
    }
}