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.
/**
 * Created by Aminul on 9/4/2017.
 */

import java.io.*;
import java.util.*;


public class CF841C {
    public static int index;
    public static void main(String[] args)throws Exception {
        InputReader in = new InputReader(System.in);
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
        int n = in.nextInt();
        P[] p = new P[n+1];
        double x[] = new double[6];

        for(int i = 1; i <= n; i++){
            for(int j = 1; j <= 5; j++){
                x[j] = in.nextDouble();
            }
            p[i] = new P(x);
        }


//        debug( getAngle(p[2].sub(p[1]) , p[3].sub(p[1]) ), getAngle(p[1], p[2]),  getAngle(p[1], p[3]));

        ArrayList<Integer> ans = new ArrayList<>();
//        for(int i = 1; i <= n; i++){
//            boolean bol = true;
//            TreeSet<Double> set = new TreeSet<>();
//            for(int j = 1; j <= n; j++){
//                if(i == j) continue;
//                double y = 90 + getAngle(p[i], p[j]);
//                double z = y - 360;
//                debug(y, z, set, set.floor(y), set.floor(z));
//                if(set.floor(y) != null || set.floor(z) != null){
//
//                    bol = false;
//                    break;
//                }
//                set.add(y);
//            }
//            if(bol) ans.add(i);
//        }

        for(int i = 1; i <= n; i++){
            boolean bol = true;
            for(int j = 1; j <= n; j++){
                if(j == i)continue;
                for(int k = 1; k <= n; k++){
                    if(k == j || k == i) continue;

                    double a = fixAng( getAngle( p[j].sub(p[i]), p[k].sub(p[i]) ) );
                    if( a < 90){
                        bol = false; break;
                    }

                }
                if(!bol) break;
            }
            if(bol) ans.add(i);
        }

        pw.println(ans.size());
        for(int i : ans){
            pw.println(i);
        }

        pw.close();
    }

    static double fixAng(double a){
        if( a < 0){
            return 360+a;
        }
        return a;
    }


    static double getAngle(P a, P b){
        double dot = a.dot(b); //debug(dot);
        double av = a.abs(), bv = b.abs(); //debug(av, bv);
        if(av == 0) av = 1;
        if(bv == 0) bv = 1;

        double ang = Math.acos(dot / (av*bv));

        ang = ang*180/Math.PI;

        if(ang < 0){
            ang += 360;
        }

        return ang;

    }


    static double EPS = 1e-9;

    static class P {
        double x[];
        P(double y[]) {
            x = new double[6];
            for(int i = 1; i <= 5; i++){
                x[i] = y[i];
            }

        }

        P sub( P p){
            P s = new P(new double[]{0,0,0,0,0, 0});
            for(int i = 1; i <= 5; i++){
                s.x[i] = p.x[i] - x[i];
            }
            return s;
        }

        double dot(P p) {
            //return x * p.x + y * p.y;
            double dot = 0;
            for(int i = 1; i <= 5; i++){
                dot += x[i]*p.x[i];
            }
            return dot;
        }

        double abs() {
            return Math.sqrt(abs2());
        }
        double abs2() {
            double a = 0;
            for(int i = 1; i <= 5; i++){
                a += x[i]*x[i];
            }
            return a;
        }

        public String toString(){
            return x.toString();
        }


    }

    static void debug(Object...obj) {
        System.err.println(Arrays.deepToString(obj));
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        //InputReader in = new InputReader(new FileReader("File_Name"));
        public InputReader(FileReader file) {
            reader = new BufferedReader(file);
            tokenizer = null;
        }

        public String next() {

            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                return null;
            }

            return tokenizer.nextToken();
        }

        public String nextLine() {
            String line = null;
            try {
                tokenizer = null;
                line =  reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

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

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

        public long nextLong() {
            return Long.parseLong(next());
        }
        public boolean hasNext(){
            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens())
                    tokenizer = new StringTokenizer(reader.readLine());
            }
            catch (Exception e) {
                return false;
            }

            return true;

        }
    }
}