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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;

public class round {
	public static boolean acute(vect v1, vect v2) {
		return v1.a * v2.a + v1.b * v2.b + v1.c * v2.c + v1.d * v2.d + v1.e * v2.e > 0;
	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		Queue<Point5> q = new LinkedList<>();
		int n = sc.nextInt();
		ArrayList<Point5> arr = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			arr.add(new Point5(sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt(), i));
			q.add(arr.get(i));
		}
		boolean[] bad = new boolean[n];
		while (!q.isEmpty() && q.size() > 2) {
			Point5 a = q.poll();
			Point5 b = q.poll();
			Point5 c = q.poll();
			bad[a.idx] |= acute(new vect(b.a - a.a, b.b - a.b, b.c - a.c, b.d - a.d, b.e - a.e),
					new vect(c.a - a.a, c.b - a.b, c.c - a.c, c.d - a.d, c.e - a.e));
			bad[b.idx] |= acute(new vect(a.a - b.a, a.b - b.b, a.c - b.c, a.d - b.d, a.e - b.e),
					new vect(c.a - b.a, c.b - b.b, c.c - b.c, c.d - b.d, c.e - b.e));
			bad[c.idx] |= acute(new vect(a.a - c.a, a.b - c.b, a.c - c.c, a.d - c.d, a.e - c.e),
					new vect(b.a - c.a, b.b - c.b, b.c - c.c, b.d - c.d, b.e - c.e));
			if (!bad[a.idx])
				q.add(a);
			if (!bad[b.idx])
				q.add(b);
			if (!bad[c.idx])
				q.add(c);

		}
		while (!q.isEmpty()) {
			Point5 a = q.poll();
			for (int i = 0; i < n && !bad[a.idx]; i++) {
				if (i == a.idx)
					continue;
				Point5 b = arr.get(i);
				for (int j = i + 1; j < n && !bad[a.idx]; j++) {
					if (j == a.idx)
						continue;
					Point5 c = arr.get(j);
					bad[a.idx] |= acute(new vect(b.a - a.a, b.b - a.b, b.c - a.c, b.d - a.d, b.e - a.e),
							new vect(c.a - a.a, c.b - a.b, c.c - a.c, c.d - a.d, c.e - a.e));
				}
			}
		}
		int c = 0;
		for (int i = 0; i < n; i++) {
			if (!bad[i])
				c++;
		}
		System.out.println(c);
		for (int i = 0; i < n; i++) {
			if (!bad[i])
				System.out.println(i + 1);
		}

	}

	static class Point5 implements Comparable<Point5> {
		int a, b, c, d, e, idx;

		public Point5(int x1, int x2, int x3, int x4, int x5, int id) {
			a = x1;
			b = x2;
			c = x3;
			d = x4;
			e = x5;
			idx = id;
		}

		public int compareTo(Point5 p) {
			return idx - p.idx;
		}
	}

	static double dis(int x, int y) {
		return 1l * x * x + 1l * y * y;
	}

	static class vect {
		int a, b, c, d, e;

		public vect(int x1, int x2, int x3, int x4, int x5) {
			a = x1;
			b = x2;
			c = x3;
			d = x4;
			e = x5;
		}
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int countTokens() throws IOException {
			while (st == null || !st.hasMoreTokens() || st.countTokens() == 0)
				st = new StringTokenizer(br.readLine());
			return st.countTokens();
		}

		public boolean nextEmpty() throws IOException {
			String s = nextLine();
			st = new StringTokenizer(s);
			return s.isEmpty();
		}
	}
}
