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.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;

import static java.lang.Math.acos;
import static java.lang.Math.pow;
import static java.lang.Math.sqrt;

public class Main {

    static class FastestReader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public FastestReader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public FastestReader(InputStream is) {
            din = new DataInputStream(is);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public FastestReader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        FastReader(final InputStream is) {
            if (is != null)
                br = new BufferedReader(new
                        InputStreamReader(is));
            else new FastReader();
        }

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

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

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

        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

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

    static class Node {
        int val = -1;
        int d;

        public Node(int val, int dist) {
            this.val = val;
            this.d = dist;
        }
    }


    public static void main(String args[]) throws Exception {

        //final FileOutputStream os = new FileOutputStream("src/output.txt");
        final FastReader reader = new FastReader();
        PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));
        //Scanner reader = new Scanner();

        int n = reader.nextInt();
        int[][] arr = new int[n][5];

        for (int i = 0; i < n; i++) {
            arr[i][0] = reader.nextInt();
            arr[i][1] = reader.nextInt();
            arr[i][2] = reader.nextInt();
            arr[i][3] = reader.nextInt();
            arr[i][4] = reader.nextInt();
        }

        int[] res = new int[n];
        int size = 0;
        int[] a, b, c;
        for (int i = 0; i < n; i++) {
            a = arr[i];
            boolean bad = false;
            for (int j = 0; j < n; j++) {
                if (i != j) {
                    b = arr[j];
                    for (int k = 0; k < n; k++) {
                        if (j != k && k != i) {
                            c = arr[k];
                            if (!check(a, b, c)) {
                                res[i] = 1;
                                bad = true;
                                break;
                            }
                        }
                    }
                    if (bad) break;
                }
            }
            if (!bad) size++;
        }

        writer.println(size);
        for (int i = 0; i < n; i++) {
            if (res[i] == 0) writer.println(i+1);
        }
        writer.close();
    }

    private static boolean check(int[] a, int[] b, int[] c) {
        double vect = (b[0] - a[0]) * (c[0] - a[0]) +
                (b[1] - a[1]) * (c[1] - a[1]) +
                (b[2] - a[2]) * (c[2] - a[2]) +
                (b[3] - a[3]) * (c[3] - a[3]) +
                (b[4] - a[4]) * (c[4] - a[4]);
        double mag1 = sqrt(pow(b[0] - a[0], 2)
                + pow(b[1] - a[1], 2)
                + pow(b[2] - a[2], 2)
                + pow(b[3] - a[3], 2)
                + pow(b[4] - a[4], 2));
        double mag2 = sqrt(pow(c[0] - a[0], 2)
                + pow(c[1] - a[1], 2)
                + pow(c[2] - a[2], 2)
                + pow(c[3] - a[3], 2)
                + pow(c[4] - a[4], 2));

        vect /= mag1;
        vect /= mag2;
        return !(acos(vect) < Math.PI / 2);
    }
}
