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.awt.*;
import java.lang.*;
import java.io.*;
import java.util.*;

public class Main {
    public class Point {
        long x, y;

        Point(long x, long y) {
            this.x = x;
            this.y = y;
        }

        Point(Point a, Point b) {
            x = b.x - a.x;
            y = b.y - a.y;
        }

        public long Len() {
            return x * x + y * y;
        }

    }

    public class Line {
        long A, B, C;

        public Line(Point first, Point second) {
            A = first.y - second.y;
            B = second.x - first.x;
            C = first.x * second.y - second.x * first.y;
        }

        public long sign(Point p) {
            long res = A * p.x + B * p.y + C;
            if (res > 0) {
                return 1;
            } else if (res == 0) {
                return 0;
            } else {
                return -1;
            }

        }
    }

    public void solve() throws IOException {
        int n = nextInt();
        if(n == 1){
            out.print("1\n1");
            return;
        }
        if(n == 2){
            out.print("2\n1\n2");
            return;
        }
        int x[][] = new int[n][5];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < 5; j++) {
                x[i][j] = nextInt();
            }
        }
        boolean isBad[] = new boolean[n];
        for (int i = 0; i < n; i++) {
            if (!isBad[i]) {
                for (int j = i + 1; j < n && !isBad[i]; j++) {
                    if (!isBad[j]) {
                        for (int k = j + 1; k < n && !isBad[i] && !isBad[j]; k++) {
                            if (!isBad[k]) {
                                int v1 = 0, v2 = 0, v3 = 0;
                                for (int q = 0; q < 5; q++) {
                                    v1 += (x[j][q] - x[i][q]) * (x[k][q] - x[i][q]);
                                    v2 += (x[i][q] - x[j][q]) * (x[k][q] - x[j][q]);
                                    v3 += (x[i][q] - x[k][q]) * (x[j][q] - x[k][q]);
                                }
                                if (v1 > 0) {
                                    isBad[i] = true;
                                }
                                if (v2 > 0) {
                                    isBad[j] = true;
                                }
                                if (v3 > 0) {
                                    isBad[k] = true;
                                }
                            }
                        }
                    }
                }
            }
        }
        ArrayList<Integer> res = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            if(!isBad[i]){
                for (int j = 0; j < n; j++) {
                    if(j == i) continue;
                    for (int k = 0; k < n; k++) {
                        if(k == i || k == j) continue;
                        int v1 = 0, v2 = 0, v3 = 0;
                        for (int q = 0; q < 5; q++) {
                            v1 += (x[j][q] - x[i][q]) * (x[k][q] - x[i][q]);
                            v2 += (x[i][q] - x[j][q]) * (x[k][q] - x[j][q]);
                            v3 += (x[i][q] - x[k][q]) * (x[j][q] - x[k][q]);
                        }
                        if (v1 > 0) {
                            isBad[i] = true;
                        }
                        if (v2 > 0) {
                            isBad[j] = true;
                        }
                        if (v3 > 0) {
                            isBad[k] = true;
                        }
                    }
                }
                if(!isBad[i]){
                    res.add(i + 1);
                }
            }
        }
        out.print(res.size() + "\n");
        for (int i = 0; i < res.size(); i++) {
            out.print(res.get(i) + "\n");
        }
    }


    BufferedReader br;
    StringTokenizer sc;
    PrintWriter out;

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Main().run();
    }

    void run() throws IOException {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    String nextToken() throws IOException {
        while (sc == null || !sc.hasMoreTokens()) {
            try {
                sc = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return sc.nextToken();
    }

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

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

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

}
