You are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two points coincide.

We will call point a bad if there are different points b and c, not equal to a, from the given set such that angle between vectors <image> and <image> is acute (i.e. strictly less than <image>). Otherwise, the point is called good.

The angle between vectors <image> and <image> in 5-dimensional space is defined as <image>, where <image> is the scalar product and <image> is length of <image>.

Given the list of points, print the indices of the good points in ascending order.

Input

The first line of input contains a single integer n (1 ≤ n ≤ 103) — the number of points.

The next n lines of input contain five integers ai, bi, ci, di, ei (|ai|, |bi|, |ci|, |di|, |ei| ≤ 103) — the coordinates of the i-th point. All points are distinct.

Output

First, print a single integer k — the number of good points.

Then, print k integers, each on their own line — the indices of the good points in ascending order.

Examples

Input

6
0 0 0 0 0
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1


Output

1
1


Input

3
0 0 1 2 0
0 0 9 2 0
0 0 5 9 0


Output

0

Note

In the first sample, the first point forms exactly a <image> angle with all other pairs of points, so it is good.

In the second sample, along the cd plane, we can see the points look as follows:

<image>

We can see that all angles here are acute, so no points are good.
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.AbstractCollection;
import java.util.StringTokenizer;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Reader;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.io.File;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.UnsupportedEncodingException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Gahwon Lee
 */
public class Main
{
	public static void main(String[] args)
	{
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
	
	static class TaskC
	{
		private Coord[] coords;
		
		public void solve(int testNumber, InputReader in, OutputWriter out)
		{
			int num = in.nextInt();
			
			coords = new Coord[num];
			for (int i = 0; i < num; i++)
			{
				coords[i] = new Coord(in.nextInt(), in.nextInt(), in.nextInt(), in.nextInt(), in.nextInt());
			}
			HashSet<Coord>[] vectors = new HashSet[num];
			for (int i = 0; i < num; i++)
			{
				vectors[i] = new HashSet<>();
				for (int j = 0; j < num; j++)
				{
					if (i != j)
						vectors[i].add(coords[i].subtract(coords[j]));
				}
			}
			
			boolean[] ans = new boolean[num];
			
			final double acuteAngle = Math.PI / 2;
			outer:
			for (int i = 0; i < num; i++)
			{
				Coord[] vecs = vectors[i].toArray(new Coord[0]);
				for (int j = 0; j < vecs.length; j++)
				{
					for (int k = j + 1; k < vecs.length; k++)
					{
						if (vecs[j].angle(vecs[k]) < acuteAngle)
							continue outer;
					}
				}
				
				ans[i] = true;
			}
			
			int nuum = 0;
			for (boolean an : ans)
			{
				nuum += an ? 1 : 0;
			}
			out.println(nuum);
			for (int i = 0; i < ans.length; i++)
			{
				if (ans[i])
					out.println(i + 1);
			}
			
			out.flush();
		}
		
		class Coord
		{
			int a;
			int b;
			int c;
			int d;
			int e;
			private double len = -1;
			
			public Coord(int a, int b, int c, int d, int e)
			{
				this.a = a;
				this.b = b;
				this.c = c;
				this.d = d;
				this.e = e;
			}
			
			public Coord(Coord coord)
			{
				this(coord.a, coord.b, coord.c, coord.d, coord.e);
			}
			
			Coord subtract(Coord o)
			{
				Coord coord = new Coord(a - o.a, b - o.b, c - o.c, d - o.d, e - o.e);
				return coord;
			}
			
			double length()
			{
				if (len == -1)
					len = realLen();
				return len;
			}
			
			double realLen()
			{
				if (a == 0 && b == 0 && c == 0 && d == 0 && e == 0)
					return 0;
				return Math.sqrt(a * a + b * b + c * c + d * d + e * e);
			}
			
			double angle(Coord o)
			{
				
				double length1 = length();
				double length2 = o.length();
				
				return Math.acos((a * o.a + b * o.b + c * o.c + d * o.d + e * o.e) / (length1 * length2));
			}
			
			
			public String toString()
			{
				return "Coord{" +
					"a=" + a +
					", b=" + b +
					", c=" + c +
					", d=" + d +
					", e=" + e +
					'}';
			}
			
			
			public boolean equals(Object o)
			{
				if (this == o) return true;
				if (o == null || getClass() != o.getClass()) return false;
				
				Coord coord = (Coord) o;
				
				if (a != coord.a) return false;
				if (b != coord.b) return false;
				if (c != coord.c) return false;
				if (d != coord.d) return false;
				return e == coord.e;
			}
			
			
			public int hashCode()
			{
				int result = a;
				result = 31 * result + b;
				result = 31 * result + c;
				result = 31 * result + d;
				result = 31 * result + e;
				return result;
			}
			
		}
		
	}
	
	static class InputReader
	{
		public BufferedReader reader;
		public StringTokenizer tokenizer;
		
		public InputReader(String fileName) throws FileNotFoundException
		{
			this(new FileReader(new File(fileName)));
		}
		
		public InputReader(InputStream in)
		{
			this(new InputStreamReader(in));
		}
		
		public InputReader(Reader reader)
		{
			this.reader = new BufferedReader(reader, 32768);
			tokenizer = null;
		}
		
		public String next()
		{
			while (tokenizer == null || !tokenizer.hasMoreTokens())
			{
				try
				{
					tokenizer = new StringTokenizer(reader.readLine());
				}
				catch (IOException e)
				{
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		
		public int nextInt()
		{
			return Integer.parseInt(next());
		}
		
	}
	
	static class OutputWriter extends PrintWriter
	{
		public OutputWriter(OutputStream out)
		{
			this(new OutputStreamWriter(out));
		}
		
		public OutputWriter(OutputStream out, boolean autoFlush)
		{
			this(new OutputStreamWriter(out), autoFlush);
		}
		
		public OutputWriter(String fileName) throws IOException
		{
			this(new FileWriter(fileName));
		}
		
		@Deprecated
		public OutputWriter(String fileName, String csn) throws FileNotFoundException, UnsupportedEncodingException
		{
			super(fileName, csn);
		}
		
		public OutputWriter(File file) throws IOException
		{
			this(new FileWriter(file));
		}
		
		@Deprecated
		public OutputWriter(File file, String csn) throws FileNotFoundException, UnsupportedEncodingException
		{
			super(file, csn);
		}
		
		public OutputWriter(Writer out)
		{
			this(out, false);
		}
		
		public OutputWriter(Writer out, boolean autoFlush)
		{
			super(new BufferedWriter(out), autoFlush);
		}
		
		
		public void close()
		{
			super.close();
		}
		
	}
}

