#include <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 10010;
int main()
{
    int n;
    scanf("%d", &n);
    int p[maxn][5];
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 5; j++){
            scanf("%d", &p[i][j]);
        }
    }
    int num[maxn];
    int ans = 0;
    if(n > 11)
        printf("0");
    else if(n < 3){
        printf("%d\n", n);
        for(int i = 0; i < n; i++){
            printf("%d\n", i + 1);
        }
    }
    else{
        for(int i = 0; i < n - 2; i++){
            int ret = 1;
            for(int j = i + 1; j < n - 1; j++){
                for(int k = j + 1; k < n; k++){
                    int a1[5];
                    int a2[5];
                    int sum = 0;
                    for(int x = 0; x < 5; x++){
                        a1[x] = p[j][x] - p[i][x];
                        a2[x] = p[k][x] - p[i][x];
                        sum += a1[x] * a2[x];
                    }
                    if(sum > 0){
                        ret = 0;
                        break;
                    }
                }
            }
            if(ret){
                num[ans++] = i + 1;
            }
        }
        printf("%d\n", ans);
        for(int i = 0 ; i < ans; i++){
            printf("%d\n", num[i]);
        }
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 10010;
int main()
{
    int n;
    scanf("%d", &n);
    int p[maxn][5];
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 5; j++){
            scanf("%d", &p[i][j]);
        }
    }
    int num[maxn];
    int ans = 0;
    if(n > 11)
        printf("0");
    else if(n < 3){
        printf("%d\n", n);
        for(int i = 0; i < n; i++){
            printf("%d\n", i + 1);
        }
    }
    else{
        for(int i = 0; i < n; i++){
            int ret = 1;
            for(int j = 0; j < n; j++){
                for(int k = 0; k < n; k++){
                    if(i != j && i != k && k != j){
                        int a1[5];
                        int a2[5];
                        int sum = 0;
                        for(int x = 0; x < 5; x++){
                            a1[x] = p[j][x] - p[i][x];
                            a2[x] = p[k][x] - p[i][x];
                            sum += a1[x] * a2[x];
                        }
                        if(sum > 0){
                            ret = 0;
                            break;
                        }
                    }
                }
            }
            if(ret){
                num[ans++] = i + 1;
            }
        }
        printf("%d\n", ans);
        for(int i = 0 ; i < ans; i++){
            printf("%d\n", num[i]);
        }
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 10010;
int main()
{
    int n;
    scanf("%d", &n);
    int p[maxn][5];
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 5; j++){
            scanf("%d", &p[i][j]);
        }
    }
    int num[maxn];
    int ans = 0;
    if(n > 11)
        printf("0");

    else{
        for(int i = 0; i < n ; i++){
            int ret = 1;
            for(int j = i + 1; j < n ; j++){
                for(int k = j + 1; k < n; k++){
                    int a1[5];
                    int a2[5];
                    int sum = 0;
                    for(int x = 0; x < 5; x++){
                        a1[x] = p[j][x] - p[i][x];
                        a2[x] = p[k][x] - p[i][x];
                        sum += a1[x] * a2[x];
                    }
                    if(sum > 0){
                        ret = 0;
                        break;
                    }
                }
            }
            if(ret){
                num[ans++] = i + 1;
            }
        }
        printf("%d\n", ans);
        for(int i = 0 ; i < ans; i++){
            printf("%d\n", num[i]);
        }
    }
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 10010;
int main()
{
    int n;
    scanf("%d", &n);
    int p[maxn][5];
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 5; j++){
            scanf("%d", &p[i][j]);
        }
    }
    int num[maxn];
    int ans = 0;
    if(n > 11)
        printf("0");

    else{
        for(int i = 0; i < n - 2; i++){
            int ret = 1;
            for(int j = i + 1; j < n - 1; j++){
                for(int k = j + 1; k < n; k++){
                    int a1[5];
                    int a2[5];
                    int sum = 0;
                    for(int x = 0; x < 5; x++){
                        a1[x] = p[j][x] - p[i][x];
                        a2[x] = p[k][x] - p[i][x];
                        sum += a1[x] * a2[x];
                    }
                    if(sum > 0){
                        ret = 0;
                        break;
                    }
                }
            }
            if(ret){
                num[ans++] = i + 1;
            }
        }
        printf("%d\n", ans);
        for(int i = 0 ; i < ans; i++){
            printf("%d\n", num[i]);
        }
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

typedef vector<int> vi;
vi operator-(vi a, vi b) {
  vi r(5);
  for (int i = 0; i < 5; i++)
    r[i] = a[i]-b[i];
  return r;
}
int operator*(vi a, vi b) {
  int r = 0;
  for (int i = 0; i < 5; i++)
    r += a[i]*b[i];
  return r;
}

int main() {
  ios::sync_with_stdio(0); cin.tie(0);
  int n;
  cin >> n;
  if (n > 100) {
    cout << 0 << endl;
  } else {
    vector<vector<int>> v(n);
    for (int i = 0; i < n; i++) {
      vector<int> p(5);
      for(int&j : p) cin >> j;
      v[i] = p;
    }
    vector<int> ans;
    for (int i = 0; i < n; i++) {
      int good = 1;
      for (int j = 0; j < n; j++) {
	for (int k = 0; k < j; k++) {
	  if ((v[i]-v[j])*(v[i]-v[k]) > 0) good = 0;
	}
      }
      if (good) ans.push_back(i+1);
    }
    cout << ans.size() << endl;
    for (int i : ans) cout << i << endl;
  }
}


#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
template <typename T>
    using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

template <char cmp = '<'>
    bool icmp(ll a, ll b){ if(cmp=='>') return a > b; else return a < b;}
namespace enhanced_pair{
    typedef pair<ll,ll> pll;
    ostream& operator << (ostream& o, const pll a){
        o<<a.first<<" "<<a.second;
        return o;
    }
    istream& operator >> (istream& i, pll& p){
        i>>p.first>>p.second;
        return i;
    }
    template <char cmp1 = '<', char cmp2 = '<'>
        bool pcmp(pll a, pll b){ return icmp<cmp1> (a.first,b.first) || (a.first==b.first && icmp<cmp2> (a.second,b.second));}
    template <char cmp1 = '<', char cmp2 = '<'>
        struct pcmpobj{bool operator()(pll a, pll b){return pcmp<cmp1,cmp2>(a,b);}};
} using namespace enhanced_pair;
ll lastbit(ll num){
    return num & -num;
}
ll binPow(ll num, ll p, ll mod){
    if(!p) return 1;
    ll aux = binPow(num,p/2,mod);
    return aux*aux%mod*(p%2?num:1)%mod;
}
inline ll modInv(ll num, ll mod){
    return binPow(num,mod-2,mod);
}
template<typename T,size_t maxSize,typename __merge_function, T& defaultValue>
class segmentTree{
    public : struct STnode{size_t l,r; T val=defaultValue;} data[maxSize*4];
    size_t leaves[maxSize];
    private : __merge_function merge_function;
    #define __curr_node data[nodeID]
    #define __prev_node data[(nodeID-1)/2]
    public : void init(size_t nodeID = 0){ /// initializing function
        if(nodeID == 0) __curr_node.l = 0, __curr_node.r = maxSize-1;
        else{
            if(nodeID & 1) {__curr_node.l=__prev_node.l; __curr_node.r=(__prev_node.l+__prev_node.r)/2;}
            else {__curr_node.r=__prev_node.r; __curr_node.l=(__prev_node.l+__prev_node.r)/2+1;}
        }
        if(__curr_node.l==__curr_node.r) leaves[__curr_node.l]=nodeID;
        else {init(nodeID*2+1); init(nodeID*2+2);}
    }
    public : void reset(){
        for(ll i=0;i<maxSize*4;i++) data[i].val=defaultValue;
    }
    private : inline size_t parent(size_t nodeID){ /// parent of nodeID
        if(nodeID) return (nodeID-1)/2;
        else return -1;
    }
    public : void set(size_t nodeID, T value){ /// replaces the element at position *nodeID* with *value*
        nodeID = leaves[nodeID];
        __curr_node.val = value; nodeID = parent(nodeID);
        while(nodeID > 0){
            __curr_node.val = merge_function(data[nodeID*2+1].val,data[nodeID*2+2].val);
            nodeID = parent(nodeID);
        }
        __curr_node.val = merge_function(data[nodeID*2+1].val,data[nodeID*2+2].val);
    }
    public : T operator [] (size_t nodeID){
        return data[leaves[nodeID]].val;
    }
    public : T query(size_t L, size_t R){ /// computes the merge function across all elements in the interval [L,R]
        if(L > R) return defaultValue;
        size_t nodeID = leaves[L];
        while(nodeID > 0 && __prev_node.l>=L && __prev_node.r<=R)
            nodeID = parent(nodeID);
        return merge_function(__curr_node.val,query(__curr_node.r+1,R));
    }
    #undef __curr_node
    #undef __prev_node
};

class Fenwick{
    private : vector<ll> data;
    public : void resize(size_t newSize){data.resize(newSize+1);};
    public : void clear(){fill(data.begin(),data.end(),0);};
    public : void add(ll pos,ll val){
        if(pos<data.size()){
            data[pos]+=val;
            add(pos+lastbit(pos),val);
        }
    }
    private : ll pref_query(ll pos){
        if(pos==0) return 0;
        return data[pos]+pref_query(pos-lastbit(pos));
    }
    public : ll query(ll pos1, ll pos2){
        return pref_query(pos2)-pref_query(pos1-1);
    }
};
const ll BIG = 1e18;
const ll NMAX = 5e5+5;
ll points[NMAX][5];
ld angle(ll i, ll j, ll k){
    ll x[5],y[5];
    ld num1=0,prod1=1,prod2=1;
    for(ll d=0;d<5;d++){
        x[d]=points[i][d]-points[j][d];
        prod1*=points[i][d];
        y[d]=points[i][d]-points[k][d];
        prod2*=points[j][d];
        num1+=x[d]*y[d];
    }
    ld num2=abs(pow(prod1,0.2)*pow(prod2,0.2));
    return acos(num1/abs(num1))/acos(-1)*180;
}
void tc(){
    ll n;
    cin>>n;
    for(ll i=0;i<n;i++)
        for(ll j=0;j<5;j++)
            cin>>points[i][j];
    if(n>100){
        cout<<0;
        return;
    }
    vector<ll> ans;
    for(ll i=0;i<n;i++){
            bool isgood=1;
        for(ll j=0;j<n;j++){
            for(ll k=0;k<n;k++){
                if(i!=j && i!=k && j!=k){
                    ld a=angle(i,j,k);
                    if(a<=90.0)
                        isgood=0;
                }
            }
        }
        if(isgood)
            ans.push_back(i+1);
    }
    cout<<ans.size()<<'\n';
    for(auto it : ans)
        cout<<it<<" ";
}
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    //ll q; cin>>q; while(q--)
        tc();
    return 0;
}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

const int N = 1010;
const double PI = acos(-1.0);
const double EPS = 1e-9;

int n;
bool mark[N];
double l[N];
long long p[N], a[N][N], x[N][N];

int dcmp(double x) {
	if (x > EPS) {
		return 1;
	} else if (x < -EPS) {
		return -1;
	} else {
		return 0;
	}
}

int main() {

	scanf("%d", &n);

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 5; j++) {
			scanf("%lld", &a[i][j]);
		}
	}

	for (int i = 0; i < n; i++) {
		mark[i] = false;
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			p[j] = 0;
			for (int k = 0; k < 5; k++) {
				x[j][k] = a[j][k] - a[i][k];
				p[j] += x[j][k] * x[j][k];
			}
			l[j] = sqrt(1.0 * p[j]);
		}
		for (int j = 0; j < n; j++) {
			for (int k = 0; k < n; k++) {
				if (j == i || k == i || j == k) {
					continue;
				}
				long long sum = 0;
				for (int pos = 0; pos < 5; pos++) {
					sum += x[j][pos] * x[k][pos];
				}
				double ang = acos(1.0 * sum / (fabs(l[j]) * fabs(l[k])));
				if (dcmp(ang - PI * 0.5) < 0) {
					mark[i] = true;
					break;
				}
			}
			if (mark[i]) {
				break;
			}
		}
	}

	int res = 0;

	for (int i = 0; i < n; i++) {
		res += (mark[i] ? 0 : 1);
	}

	printf("%d\n", res);

	for (int i = 0; i < n; i++) {
		if (!mark[i]) {
			printf("%d\n", i + 1);
		}
	}

	return 0;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

const int N = 1010;
const double PI = acos(-1.0);
const double EPS = 1e-9;

int n;
bool mark[N];
double l[N];
long long p[N], a[N][N], x[N][N];

int dcmp(double x) {
	if (x > EPS) {
		return 1;
	} else if (x < -EPS) {
		return -1;
	} else {
		return 0;
	}
}

int main() {

	scanf("%d", &n);

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 5; j++) {
			scanf("%lld", &a[i][j]);
		}
	}

	for (int i = 0; i < n; i++) {
		mark[i] = false;
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			p[j] = 0;
			for (int k = 0; k < 5; k++) {
				x[j][k] = a[j][k] - a[i][k];
				p[j] += x[j][k] * x[j][k];
			}
			l[j] = sqrt(1.0 * p[j]);
		}
		for (int j = i + 1; j < n; j++) {
			for (int k = j + 1; k < n; k++) {
				if (j == i || k == i) {
					continue;
				}
				long long sum = 0;
				for (int pos = 0; pos < 5; pos++) {
					sum += x[j][pos] * x[k][pos];
				}
				double ang = acos(1.0 * sum / (p[j] * p[k]));
				if (dcmp(ang - PI * 0.5) < 0) {
					mark[i] = mark[j] = mark[k] = true;
					break;
				}
			}
			if (mark[i]) {
				break;
			}
		}
	}

	int res = 0;

	for (int i = 0; i < n; i++) {
		res += (mark[i] ? 0 : 1);
	}

	printf("%d\n", res);

	for (int i = 0; i < n; i++) {
		if (!mark[i]) {
			printf("%d\n", i + 1);
		}
	}

	return 0;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

const int N = 1010;
const double PI = acos(-1.0);
const double EPS = 1e-9;

int n;
bool mark[N];
double l[N];
long long p[N], a[N][N], x[N][N];

int dcmp(double x) {
	if (x > EPS) {
		return 1;
	} else if (x < -EPS) {
		return -1;
	} else {
		return 0;
	}
}

int main() {

	scanf("%d", &n);

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 5; j++) {
			scanf("%lld", &a[i][j]);
		}
	}

	for (int i = 0; i < n; i++) {
		mark[i] = false;
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			p[j] = 0;
			for (int k = 0; k < 5; k++) {
				x[j][k] = a[j][k] - a[i][k];
				p[j] += x[j][k] * x[j][k];
			}
			l[j] = sqrt(1.0 * p[j]);
		}
		for (int j = i + 1; j < n; j++) {
			for (int k = j + 1; k < n; k++) {
				if (j == i || k == i) {
					continue;
				}
				long long sum = 0;
				for (int pos = 0; pos < 5; pos++) {
					sum += x[j][pos] * x[k][pos];
				}
				double ang = acos(1.0 * sum / (fabs(l[j]) * fabs(l[k])));
				if (dcmp(ang - PI * 0.5) < 0) {
					mark[i] = mark[j] = mark[k] = true;
					break;
				}
			}
			if (mark[i]) {
				break;
			}
		}
	}

	int res = 0;

	for (int i = 0; i < n; i++) {
		res += (mark[i] ? 0 : 1);
	}

	printf("%d\n", res);

	for (int i = 0; i < n; i++) {
		if (!mark[i]) {
			printf("%d\n", i + 1);
		}
	}

	return 0;

}


#include <bits/stdc++.h>

using namespace std;

#define range(i, m, n) for(int i = m; i < n; i++)
#define husk(i, m, n) for(int i = m; i > n; i--)

int n;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<int> a(n), b(n), c(n), d(n), e(n);
  range(i, 0, n) cin >> a[i] >> b[i] >> c[i] >> d[i] >> e[i];
  if(n >= 12) {
    cout << n << endl;
    range(i, 1, n + 1) cout << i << "\n";
    return 0;
  }
  vector<int> res;
  range(x, 0, n) {
    range(y, 0, n) {
      range(z, 0, n) {
        if(y == x || z == x || y == z) continue;
        int s = (a[x] - a[y]) * (a[x] - a[z]) + (b[x] - b[y]) * (b[x] - b[z]) + (c[x] - c[y]) * (c[x] - c[z]) + (d[x] - d[y]) * (d[x] - d[z]) + (e[x] - e[y]) * (e[x] - e[z]);
        if(s > 0) goto A;
      }
    }
    res.push_back(x);
    A:;
  }
  cout << res.size() << endl;
  for(int i : res) cout << i + 1 << "\n";
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define range(i, m, n) for(int i = m; i < n; i++)
#define husk(i, m, n) for(int i = m; i > n; i--)

int n;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<int> a(n), b(n), c(n), d(n), e(n);
  range(i, 0, n) cin >> a[i] >> b[i] >> c[i] >> d[i] >> e[i];
  if(n >= 12) {
    cout << 0 << endl;
    return 0;
  }
  vector<int> res;
  range(x, 0, n) {
    range(y, 0, n) {
      range(z, 0, n) {
        if(y == x || z == x || y == z) continue;
        int s = (a[x] - a[y]) * (a[x] - a[z]) + (b[x] - b[y]) * (b[x] - b[z]) + (c[x] - c[y]) * (c[x] - c[z]) + (d[x] - d[y]) * (d[x] - d[z]) + (e[x] - e[y]) * (e[x] - e[z]);
        if(s > 0) goto A;
      }
    }
    res.push_back(x);
    A:;
  }
  cout << res.size() << endl;
  for(int i : res) cout << i + 1 << "\n";
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define range(i, m, n) for(int i = m; i < n; i++)
#define husk(i, m, n) for(int i = m; i > n; i--)

int n;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<int> a(n), b(n), c(n), d(n), e(n);
  range(i, 0, n) cin >> a[i] >> b[i] >> c[i] >> d[i] >> e[i];
  if(n >= 100) {
    cout << n << endl;
    range(i, 1, n + 1) cout << i << "\n";
    return 0;
  }
  vector<int> res;
  range(x, 0, n) {
    range(y, 0, n) {
      range(z, 0, n) {
        if(y == x || z == x || y == z) continue;
        int s = (a[x] - a[y]) * (a[x] - a[z]) + (b[x] - b[y]) * (b[x] - b[z]) + (c[x] - c[y]) * (c[x] - c[z]) + (d[x] - d[y]) * (d[x] - d[z]) + (e[x] - e[y]) * (e[x] - e[z]);
        if(s > 0) goto A;
      }
    }
    res.push_back(x);
    A:;
  }
  cout << res.size() << endl;
  for(int i : res) cout << i + 1 << "\n";
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

const int N = 1'000;

int point[N][5];

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);

  int n;
  cin >> n;

  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < 5; ++j) {
      cin >> point[i][j];
    }
  }

  vector<int> ans;
  for (int i = 0; i < n; ++i) {
    bool bad = false;
    for (int j = 0; j < n; ++j) {
      if (j != i) {
        for (int k = j + 1; k < n; ++k) {
          if (k != i) {
            long long numerator = 0;
            for (int ii = 0; ii < 5; ++ii) {
              numerator += (point[i][ii] - point[j][ii]) * (point[i][ii] - point[k][ii]);
            }
            if (numerator > 0) {
              bad = true;
              goto done;
            }
          }
        }
      }
    }
done:

    if (!bad) {
      ans.push_back(i);
    }
  }

  cout << ans.size() << "\n";
  for (auto i : ans) {
    cout << i + 1 << " ";
  }
  cout << "\n";
}


/*
	22 January 2020
	islingr
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

using ll = long long;
using ld = long double;

using pii = pair<int, int>;
using pll = pair<ll, ll>;

using vi = vector<int>;
using vl = vector<ll>;

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend()
#define rsz resize
#define ins insert
#define ft front
#define bk back
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define fi first
#define se second

#define rep(i, a, b) for (auto i = (a); i < (b); ++i) // [a, b)
#define per(i, a, b) for (auto i = (b) - 1; i >= (a); --i) // (b, a]
#define trav(e, x) for (auto &e : x)

template<class T>
bool ckmin(T& a, const T& b) {
	return a > b ? a = b, 1 : 0;
}
template<class T>
bool ckmax(T& a, const T& b) {
	return a < b ? a = b, 1 : 0;
}

mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());

template <class T> using Tree = tree<T, null_type, less<T>,
	rb_tree_tag, tree_order_statistics_node_update>;
#define ook order_of_key
#define fbo find_by_order

namespace helper {
	template<class T, class = decltype(begin(declval<T>()))>
	inline constexpr auto is_iterable(int) { return true_type{}; }

	template<class>
	inline constexpr auto is_iterable(unsigned) { return false_type{}; }
}

namespace input {
	void re(string &s) { cin >> s; }

	template<class T> void re(T& x);
	template<class P, class Q> void re(pair<P, Q>&);
	template<class T, class... Ts> void re(T& t, Ts&... ts);

	template<class T> void re(T& x, false_type) { cin >> x; }
	template<class T> void re(T& x, true_type) {
		for (auto &v : x) re(v);
	}
	template<class T> void re(T& x) {
		re(x, helper::is_iterable<T>(0));
	}
	template<class P, class Q>
	void re(pair<P, Q> &p) {
		re(p.first, p.second);
	}
	template<class T, class... Ts> void re(T& t, Ts&... ts) {
		re(t);
		re(ts...);
	}
}

namespace output {
	template <typename T> void pr(const T&);
	template<class T, class... Ts> void pr(const T&, const Ts&...);

	template<class S, class T>
	void pr(const pair<S, T> &p) {
		pr("(", p.first, ",", p.second, ")");
	}

	template<class T>
	void pr(queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.front()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(priority_queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.top()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(stack<T> s) {
		pr("{"); bool c = false;
		while (!s.empty())
			pr(c ? ", " : "", s.top()),
			s.pop(),
			c = true;
		pr("}");
	}
	void pr(const string &s) { cout << s; }

	template<typename T>
	void pr(const T& x, false_type) { cout << x; }

	template<typename T>
	void pr(const T& x, true_type) {
		pr("{"); bool f = false;
		for (const auto &v : x)
			pr(f ? ", " : "", v),
			f = true;
		pr("}");
	}

	template <typename T>
	void pr(const T& x) {
		pr(x, helper::is_iterable<T>(0));
	}

	template<class T, class... Ts>
	void pr(const T& t, const Ts&... ts) { pr(t); pr(ts...); }

	void pc() { pr("]\n"); } // debug w/ commas

	template<class T, class... Ts>
	void pc(const T& t, const Ts&... ts) {
		pr(t);
		if (sizeof...(ts)) pr(", ");
		pc(ts...);
	}

	#define dbg(x...) pr("[", #x, "] = ["), pc(x);
}

struct IO {
	IO(bool b) {
		if (b) fastio();
	}
	IO(bool b, string s) {
		if (b) fastio();
		setIn(s + ".in");
		setOut(s + ".out");
	}
	void fastio() {
		ios_base::sync_with_stdio(false);
		cin.tie(nullptr);
	}
	void setIn(string s) { freopen(s.c_str(), "r", stdin); }
	void setOut(string s) { freopen(s.c_str(), "w", stdout); }
};

using namespace input;
using namespace output;
IO io = IO(true);

ld pi = acos(-1);

template<size_t n>
ll dot(const array<int, n> &a, const array<int, n> &b) {
    ll res = 0;
    rep(i, 0, n) res += a[i] * b[i];
    return res;
}

template<size_t n>
ld abs(const array<int, n> &a) {
    return sqrt(dot(a, a));
}

template<size_t n>
ld ang(const array<int, n> &a, const array<int, n> &b) {
    return acos(dot(a, b) / (abs(a) * abs(b)));
}

template<size_t n>
array<int, n> operator-(const array<int, n> &a, const array<int, n> &b) {
    array<int, n> c;
    rep(i, 0, n) c[i] = a[i] - b[i];
    return c;
}

vi solve() {
    int n; re(n);
    vector<array<int, 5>> v(n); re(v);
    if (n > 11) return { };
    vi res;
    rep(i, 0, n) {
        bool flag = true;
        rep(j, 0, n) {
            rep(k, 0, n) {
                if (i == j || j == k || k == i) continue;
                if (ang(v[k] - v[i], v[j] - v[i]) < pi / 2)
                    flag = false;
            }
        }
        if (flag) res.pb(i + 1);
    }
    return res;
}

signed main() {
    auto v = solve();
    pr(sz(v), '\n');
    trav(x, v) pr(x, ' ');
}


/*
	22 January 2020
	islingr
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

using ll = long long;
using ld = long double;

using pii = pair<int, int>;
using pll = pair<ll, ll>;

using vi = vector<int>;
using vl = vector<ll>;

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend()
#define rsz resize
#define ins insert
#define ft front
#define bk back
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define fi first
#define se second

#define rep(i, a, b) for (auto i = (a); i < (b); ++i) // [a, b)
#define per(i, a, b) for (auto i = (b) - 1; i >= (a); --i) // (b, a]
#define trav(e, x) for (auto &e : x)

template<class T>
bool ckmin(T& a, const T& b) {
	return a > b ? a = b, 1 : 0;
}
template<class T>
bool ckmax(T& a, const T& b) {
	return a < b ? a = b, 1 : 0;
}

mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());

template <class T> using Tree = tree<T, null_type, less<T>,
	rb_tree_tag, tree_order_statistics_node_update>;
#define ook order_of_key
#define fbo find_by_order

namespace helper {
	template<class T, class = decltype(begin(declval<T>()))>
	inline constexpr auto is_iterable(int) { return true_type{}; }

	template<class>
	inline constexpr auto is_iterable(unsigned) { return false_type{}; }
}

namespace input {
	void re(string &s) { cin >> s; }

	template<class T> void re(T& x);
	template<class P, class Q> void re(pair<P, Q>&);
	template<class T, class... Ts> void re(T& t, Ts&... ts);

	template<class T> void re(T& x, false_type) { cin >> x; }
	template<class T> void re(T& x, true_type) {
		for (auto &v : x) re(v);
	}
	template<class T> void re(T& x) {
		re(x, helper::is_iterable<T>(0));
	}
	template<class P, class Q>
	void re(pair<P, Q> &p) {
		re(p.first, p.second);
	}
	template<class T, class... Ts> void re(T& t, Ts&... ts) {
		re(t);
		re(ts...);
	}
}

namespace output {
	template <typename T> void pr(const T&);
	template<class T, class... Ts> void pr(const T&, const Ts&...);

	template<class S, class T>
	void pr(const pair<S, T> &p) {
		pr("(", p.first, ",", p.second, ")");
	}

	template<class T>
	void pr(queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.front()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(priority_queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.top()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(stack<T> s) {
		pr("{"); bool c = false;
		while (!s.empty())
			pr(c ? ", " : "", s.top()),
			s.pop(),
			c = true;
		pr("}");
	}
	void pr(const string &s) { cout << s; }

	template<typename T>
	void pr(const T& x, false_type) { cout << x; }

	template<typename T>
	void pr(const T& x, true_type) {
		pr("{"); bool f = false;
		for (const auto &v : x)
			pr(f ? ", " : "", v),
			f = true;
		pr("}");
	}

	template <typename T>
	void pr(const T& x) {
		pr(x, helper::is_iterable<T>(0));
	}

	template<class T, class... Ts>
	void pr(const T& t, const Ts&... ts) { pr(t); pr(ts...); }

	void pc() { pr("]\n"); } // debug w/ commas

	template<class T, class... Ts>
	void pc(const T& t, const Ts&... ts) {
		pr(t);
		if (sizeof...(ts)) pr(", ");
		pc(ts...);
	}

	#define dbg(x...) pr("[", #x, "] = ["), pc(x);
}

struct IO {
	IO(bool b) {
		if (b) fastio();
	}
	IO(bool b, string s) {
		if (b) fastio();
		setIn(s + ".in");
		setOut(s + ".out");
	}
	void fastio() {
		ios_base::sync_with_stdio(false);
		cin.tie(nullptr);
	}
	void setIn(string s) { freopen(s.c_str(), "r", stdin); }
	void setOut(string s) { freopen(s.c_str(), "w", stdout); }
};

using namespace input;
using namespace output;
IO io = IO(true);

ld pi = acos(-1);

template<size_t n>
ll dot(const array<int, n> &a, const array<int, n> &b) {
    ll res = 0;
    rep(i, 0, n) res += a[i] * b[i];
    return res;
}

template<size_t n>
ld abs(const array<int, n> &a) {
    return sqrt(dot(a, a));
}

template<size_t n>
ld ang(const array<int, n> &a, const array<int, n> &b) {
    ld x = acos(dot(a, b) / (abs(a) * abs(b)));
}

template<size_t n>
array<int, n> operator-(const array<int, n> &a, const array<int, n> &b) {
    array<int, n> c;
    rep(i, 0, n) c[i] = a[i] - b[i];
    return c;
}

vi solve() {
    int n; re(n);
    vector<array<int, 5>> v(n); re(v);
    if (n > 11) return { };
    vi res;
    rep(i, 0, n) {
        bool flag = true;
        rep(j, 0, n) {
            rep(k, 0, n) {
                if (i == j || j == k || k == i) continue;
                if (ang(v[k] - v[i], v[j] - v[i]) < pi / 2)
                    flag = false;
            }
        }
        if (flag) res.pb(i + 1);
    }
    return res;
}

signed main() {
    auto v = solve();
    pr(sz(v), '\n');
    trav(x, v) pr(x, ' ');
}


/*
	22 January 2020
	islingr
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

using ll = long long;
using ld = long double;

using pii = pair<int, int>;
using pll = pair<ll, ll>;

using vi = vector<int>;
using vl = vector<ll>;

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend()
#define rsz resize
#define ins insert
#define ft front
#define bk back
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define fi first
#define se second

#define rep(i, a, b) for (auto i = (a); i < (b); ++i) // [a, b)
#define per(i, a, b) for (auto i = (b) - 1; i >= (a); --i) // (b, a]
#define trav(e, x) for (auto &e : x)

template<class T>
bool ckmin(T& a, const T& b) {
	return a > b ? a = b, 1 : 0;
}
template<class T>
bool ckmax(T& a, const T& b) {
	return a < b ? a = b, 1 : 0;
}

mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());

template <class T> using Tree = tree<T, null_type, less<T>,
	rb_tree_tag, tree_order_statistics_node_update>;
#define ook order_of_key
#define fbo find_by_order

namespace helper {
	template<class T, class = decltype(begin(declval<T>()))>
	inline constexpr auto is_iterable(int) { return true_type{}; }

	template<class>
	inline constexpr auto is_iterable(unsigned) { return false_type{}; }
}

namespace input {
	void re(string &s) { cin >> s; }

	template<class T> void re(T& x);
	template<class P, class Q> void re(pair<P, Q>&);
	template<class T, class... Ts> void re(T& t, Ts&... ts);

	template<class T> void re(T& x, false_type) { cin >> x; }
	template<class T> void re(T& x, true_type) {
		for (auto &v : x) re(v);
	}
	template<class T> void re(T& x) {
		re(x, helper::is_iterable<T>(0));
	}
	template<class P, class Q>
	void re(pair<P, Q> &p) {
		re(p.first, p.second);
	}
	template<class T, class... Ts> void re(T& t, Ts&... ts) {
		re(t);
		re(ts...);
	}
}

namespace output {
	template <typename T> void pr(const T&);
	template<class T, class... Ts> void pr(const T&, const Ts&...);

	template<class S, class T>
	void pr(const pair<S, T> &p) {
		pr("(", p.first, ",", p.second, ")");
	}

	template<class T>
	void pr(queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.front()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(priority_queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.top()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(stack<T> s) {
		pr("{"); bool c = false;
		while (!s.empty())
			pr(c ? ", " : "", s.top()),
			s.pop(),
			c = true;
		pr("}");
	}
	void pr(const string &s) { cout << s; }

	template<typename T>
	void pr(const T& x, false_type) { cout << x; }

	template<typename T>
	void pr(const T& x, true_type) {
		pr("{"); bool f = false;
		for (const auto &v : x)
			pr(f ? ", " : "", v),
			f = true;
		pr("}");
	}

	template <typename T>
	void pr(const T& x) {
		pr(x, helper::is_iterable<T>(0));
	}

	template<class T, class... Ts>
	void pr(const T& t, const Ts&... ts) { pr(t); pr(ts...); }

	void pc() { pr("]\n"); } // debug w/ commas

	template<class T, class... Ts>
	void pc(const T& t, const Ts&... ts) {
		pr(t);
		if (sizeof...(ts)) pr(", ");
		pc(ts...);
	}

	#define dbg(x...) pr("[", #x, "] = ["), pc(x);
}

struct IO {
	IO(bool b) {
		if (b) fastio();
	}
	IO(bool b, string s) {
		if (b) fastio();
		setIn(s + ".in");
		setOut(s + ".out");
	}
	void fastio() {
		ios_base::sync_with_stdio(false);
		cin.tie(nullptr);
	}
	void setIn(string s) { freopen(s.c_str(), "r", stdin); }
	void setOut(string s) { freopen(s.c_str(), "w", stdout); }
};

using namespace input;
using namespace output;
IO io = IO(true);

ld pi = acos(-1);

template<size_t n>
ll dot(const array<int, n> &a, const array<int, n> &b) {
    ll res = 0;
    rep(i, 0, n) res += a[i] * b[i];
    return res;
}

template<size_t n>
ld abs(const array<int, n> &a) {
    return sqrt(dot(a, a));
}

template<size_t n>
ld ang(const array<int, n> &a, const array<int, n> &b) {
    return acos(dot(a, b) / (abs(a) * abs(b)));
}

template<size_t n>
array<int, n> operator-(const array<int, n> &a, const array<int, n> &b) {
    array<int, n> c;
    rep(i, 0, n) c[i] = a[i] - b[i];
    return c;
}

vi solve() {
    int n; re(n);
    vector<array<int, 5>> v(n); re(v);
    if (n > 10) return { };
    vi res;
    rep(i, 0, n) {
        bool flag = true;
        rep(j, 0, n) {
            rep(k, 0, n) {
                if (i == j || j == k || k == i) continue;
                if (ang(v[k] - v[i], v[j] - v[i]) < pi / 2)
                    flag = false;
            }
        }
        if (flag) res.pb(i + 1);
    }
    return res;
}

signed main() {
    auto v = solve();
    pr(sz(v), '\n');
    trav(x, v) pr(x, ' ');
}


/*
	22 January 2020
	islingr
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

using ll = long long;
using ld = long double;

using pii = pair<int, int>;
using pll = pair<ll, ll>;

using vi = vector<int>;
using vl = vector<ll>;

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend()
#define rsz resize
#define ins insert
#define ft front
#define bk back
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define fi first
#define se second

#define rep(i, a, b) for (auto i = (a); i < (b); ++i) // [a, b)
#define per(i, a, b) for (auto i = (b) - 1; i >= (a); --i) // (b, a]
#define trav(e, x) for (auto &e : x)

template<class T>
bool ckmin(T& a, const T& b) {
	return a > b ? a = b, 1 : 0;
}
template<class T>
bool ckmax(T& a, const T& b) {
	return a < b ? a = b, 1 : 0;
}

mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());

template <class T> using Tree = tree<T, null_type, less<T>,
	rb_tree_tag, tree_order_statistics_node_update>;
#define ook order_of_key
#define fbo find_by_order

namespace helper {
	template<class T, class = decltype(begin(declval<T>()))>
	inline constexpr auto is_iterable(int) { return true_type{}; }

	template<class>
	inline constexpr auto is_iterable(unsigned) { return false_type{}; }
}

namespace input {
	void re(string &s) { cin >> s; }

	template<class T> void re(T& x);
	template<class P, class Q> void re(pair<P, Q>&);
	template<class T, class... Ts> void re(T& t, Ts&... ts);

	template<class T> void re(T& x, false_type) { cin >> x; }
	template<class T> void re(T& x, true_type) {
		for (auto &v : x) re(v);
	}
	template<class T> void re(T& x) {
		re(x, helper::is_iterable<T>(0));
	}
	template<class P, class Q>
	void re(pair<P, Q> &p) {
		re(p.first, p.second);
	}
	template<class T, class... Ts> void re(T& t, Ts&... ts) {
		re(t);
		re(ts...);
	}
}

namespace output {
	template <typename T> void pr(const T&);
	template<class T, class... Ts> void pr(const T&, const Ts&...);

	template<class S, class T>
	void pr(const pair<S, T> &p) {
		pr("(", p.first, ",", p.second, ")");
	}

	template<class T>
	void pr(queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.front()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(priority_queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.top()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(stack<T> s) {
		pr("{"); bool c = false;
		while (!s.empty())
			pr(c ? ", " : "", s.top()),
			s.pop(),
			c = true;
		pr("}");
	}
	void pr(const string &s) { cout << s; }

	template<typename T>
	void pr(const T& x, false_type) { cout << x; }

	template<typename T>
	void pr(const T& x, true_type) {
		pr("{"); bool f = false;
		for (const auto &v : x)
			pr(f ? ", " : "", v),
			f = true;
		pr("}");
	}

	template <typename T>
	void pr(const T& x) {
		pr(x, helper::is_iterable<T>(0));
	}

	template<class T, class... Ts>
	void pr(const T& t, const Ts&... ts) { pr(t); pr(ts...); }

	void pc() { pr("]\n"); } // debug w/ commas

	template<class T, class... Ts>
	void pc(const T& t, const Ts&... ts) {
		pr(t);
		if (sizeof...(ts)) pr(", ");
		pc(ts...);
	}

	#define dbg(x...) pr("[", #x, "] = ["), pc(x);
}

struct IO {
	IO(bool b) {
		if (b) fastio();
	}
	IO(bool b, string s) {
		if (b) fastio();
		setIn(s + ".in");
		setOut(s + ".out");
	}
	void fastio() {
		ios_base::sync_with_stdio(false);
		cin.tie(nullptr);
	}
	void setIn(string s) { freopen(s.c_str(), "r", stdin); }
	void setOut(string s) { freopen(s.c_str(), "w", stdout); }
};

using namespace input;
using namespace output;
IO io = IO(true);

ld pi = acos(-1);

template<size_t n>
ll dot(const array<int, n> &a, const array<int, n> &b) {
    ll res = 0;
    rep(i, 0, n) res += a[i] * b[i];
    return res;
}

template<size_t n>
ld abs(const array<int, n> &a) {
    return sqrt(dot(a, a));
}

template<size_t n>
ld ang(const array<int, n> &a, const array<int, n> &b) {
    return acos(dot(a, b) / (abs(a) * abs(b)));
}

template<size_t n>
array<int, n> operator-(const array<int, n> &a, const array<int, n> &b) {
    array<int, n> c;
    rep(i, 0, n) c[i] = a[i] - b[i];
    return c;
}

vi solve() {
    int n; re(n);
    vector<array<int, 5>> v(n); re(v);
    if (n > 11) return { };
    vi res;
    rep(i, 0, n) {
        bool flag = true;
        rep(j, 0, n) {
            rep(k, 0, n) {
                if (i == j || j == k || k == i) continue;
                if (ang(v[k] - v[i], v[j] - v[i]) < pi / 2)
                    flag = false;
            }
        }
        if (flag) res.pb(i + 1);
    }
    return res;
}

signed main() {
    auto v = solve();
    pr(sz(v), '\n');
    trav(x, v) pr(x, ' ');
}/*
	22 January 2020
	islingr
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

using ll = long long;
using ld = long double;

using pii = pair<int, int>;
using pll = pair<ll, ll>;

using vi = vector<int>;
using vl = vector<ll>;

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend()
#define rsz resize
#define ins insert
#define ft front
#define bk back
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define fi first
#define se second

#define rep(i, a, b) for (auto i = (a); i < (b); ++i) // [a, b)
#define per(i, a, b) for (auto i = (b) - 1; i >= (a); --i) // (b, a]
#define trav(e, x) for (auto &e : x)

template<class T>
bool ckmin(T& a, const T& b) {
	return a > b ? a = b, 1 : 0;
}
template<class T>
bool ckmax(T& a, const T& b) {
	return a < b ? a = b, 1 : 0;
}

mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());

template <class T> using Tree = tree<T, null_type, less<T>,
	rb_tree_tag, tree_order_statistics_node_update>;
#define ook order_of_key
#define fbo find_by_order

namespace helper {
	template<class T, class = decltype(begin(declval<T>()))>
	inline constexpr auto is_iterable(int) { return true_type{}; }

	template<class>
	inline constexpr auto is_iterable(unsigned) { return false_type{}; }
}

namespace input {
	void re(string &s) { cin >> s; }

	template<class T> void re(T& x);
	template<class P, class Q> void re(pair<P, Q>&);
	template<class T, class... Ts> void re(T& t, Ts&... ts);

	template<class T> void re(T& x, false_type) { cin >> x; }
	template<class T> void re(T& x, true_type) {
		for (auto &v : x) re(v);
	}
	template<class T> void re(T& x) {
		re(x, helper::is_iterable<T>(0));
	}
	template<class P, class Q>
	void re(pair<P, Q> &p) {
		re(p.first, p.second);
	}
	template<class T, class... Ts> void re(T& t, Ts&... ts) {
		re(t);
		re(ts...);
	}
}

namespace output {
	template <typename T> void pr(const T&);
	template<class T, class... Ts> void pr(const T&, const Ts&...);

	template<class S, class T>
	void pr(const pair<S, T> &p) {
		pr("(", p.first, ",", p.second, ")");
	}

	template<class T>
	void pr(queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.front()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(priority_queue<T> q) {
		pr("{"); bool c = false;
		while (!q.empty())
			pr(c ? ", " : "", q.top()),
			q.pop(),
			c = true;
		pr("}");
	}
	template<class T>
	void pr(stack<T> s) {
		pr("{"); bool c = false;
		while (!s.empty())
			pr(c ? ", " : "", s.top()),
			s.pop(),
			c = true;
		pr("}");
	}
	void pr(const string &s) { cout << s; }

	template<typename T>
	void pr(const T& x, false_type) { cout << x; }

	template<typename T>
	void pr(const T& x, true_type) {
		pr("{"); bool f = false;
		for (const auto &v : x)
			pr(f ? ", " : "", v),
			f = true;
		pr("}");
	}

	template <typename T>
	void pr(const T& x) {
		pr(x, helper::is_iterable<T>(0));
	}

	template<class T, class... Ts>
	void pr(const T& t, const Ts&... ts) { pr(t); pr(ts...); }

	void pc() { pr("]\n"); } // debug w/ commas

	template<class T, class... Ts>
	void pc(const T& t, const Ts&... ts) {
		pr(t);
		if (sizeof...(ts)) pr(", ");
		pc(ts...);
	}

	#define dbg(x...) pr("[", #x, "] = ["), pc(x);
}

struct IO {
	IO(bool b) {
		if (b) fastio();
	}
	IO(bool b, string s) {
		if (b) fastio();
		setIn(s + ".in");
		setOut(s + ".out");
	}
	void fastio() {
		ios_base::sync_with_stdio(false);
		cin.tie(nullptr);
	}
	void setIn(string s) { freopen(s.c_str(), "r", stdin); }
	void setOut(string s) { freopen(s.c_str(), "w", stdout); }
};

using namespace input;
using namespace output;
IO io = IO(true);

ld pi = acos(-1);

template<size_t n>
ll dot(const array<int, n> &a, const array<int, n> &b) {
    ll res = 0;
    rep(i, 0, n) res += a[i] * b[i];
    return res;
}

template<size_t n>
ld abs(const array<int, n> &a) {
    return sqrt(dot(a, a));
}

template<size_t n>
ld ang(const array<int, n> &a, const array<int, n> &b) {
    return acos(dot(a, b) / (abs(a) * abs(b)));
}

template<size_t n>
array<int, n> operator-(const array<int, n> &a, const array<int, n> &b) {
    array<int, n> c;
    rep(i, 0, n) c[i] = a[i] - b[i];
    return c;
}

vi solve() {
    int n; re(n);
    vector<array<int, 5>> v(n); re(v);
    if (n > 11) return { };
    vi res;
    rep(i, 0, n) {
        bool flag = true;
        rep(j, 0, n) {
            rep(k, 0, n) {
                if (i == j || j == k || k == i) continue;
                if (ang(v[k] - v[i], v[j] - v[i]) < pi / 2)
                    flag = false;
            }
        }
        if (flag) res.pb(i + 1);
    }
    return res;
}

signed main() {
    auto v = solve();
    pr(sz(v), '\n');
    trav(x, v) pr(x, ' ');
}


#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops")
using namespace std;
#define ll long long
//#define int ll
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n+1)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define pii pair<int, int>
#define f first
#define s second
#define pb push_back
#define ALL(x) x.begin(), x.end()
#define SZ(x) (int)(x.size())

const ll inf=(1ll<<60);
const double PI=acos(-1);
const int iinf=2147483647;
const ll mod=1e9+7;
const ll maxn=1e4+5;

struct Point{
	double a,b,c,d,e;
};
double dot(Point A, Point B){
	return A.a*B.a+A.b*B.b+A.c*B.c+A.d*B.d+A.e*B.e;
}
Point sub(Point A, Point B){
	return {A.a-B.a, A.b-B.b, A.c-B.c, A.d-B.d, A.e-B.e};
}
signed main(){
	int n; cin>>n;
	vector<Point> vc(n);
	REP(i,n) cin>>vc[i].a>>vc[i].b>>vc[i].c>>vc[i].d>>vc[i].e;
	if (n>11){
		cout<<0<<endl;
		return 0;
	}
	int cnt=0;
	vector<int> ans;
	REP(i,n){
		bool die=false;
		REP(j,n){
			if (j==i) continue;
			if (die) break;
			REP(k,n){
				if (k==j||k==i) continue;
				double top=dot(sub(vc[j], vc[i]), sub(vc[k], vc[i]));
				double bot=sqrt(dot(sub(vc[j], vc[i]), sub(vc[j], vc[i])))*sqrt(dot(sub(vc[k], vc[i]), sub(vc[k], vc[i])));
				double res=acos(top/bot);
				if (res<PI/2) {
					die=true;
					break;
				}
			}
		}
		if (!die) {
			cnt++;
			ans.pb(i+1);
		}
	}
	cout<<cnt<<endl;
	REP(i,cnt) cout<<ans[i]<<endl;

}


// “We do not remember days, we remember moments.”
// ― Jennifer Niven, All the Bright Places
// "Happiness is a choice and life is beautiful"

#include<bits/stdc++.h>
using namespace std;
using namespace std::chrono;

#pragma GCC                     optimize ("Ofast")
#pragma GCC                     optimize("O3")
#define db                      double
#define ll                      long long
#define ull                     unsigned long long
#define lo(i,a,n,x)             for(i=a;i<=n;i=i+x)
#define loi(i,a,n,x)            for(i=a;i>=n;i=i-x)
#define sc                      scanf
#define pr                      printf
#define ms(a,b)                 memset(a, b, sizeof(a))
#define pb(a)                   push_back(a)
#define pop()                   pop_back()
#define mp                      make_pair
#define VI                      vector <int>
#define PII                     pair <int,int>
#define PLL                     pair <long long,long long>
#define ff                      first
#define ss                      second
#define sqr(x)                  (x)*(x)
#define SZ(a)                   (int)a.size()
#define FAST_CIN                ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stlloop(v)              for(__typeof(v.begin()) it=v.begin();it!=v.end();it++)
#define UNIQUE(v)               (v).erase(unique((v).begin(),(v).end()),(v).end())
#define POPCOUNT(m)             __builtin_popcountll(m)
#define RIGHTMOST(m)            __builtin_ctzll(m)
#define LEFTMOST(x)             (63-__builtin_clzll((x)))
#define ODD(x)                  (((x)&1)==0?(0):(1))
#define TEST_CASE(t)            for(int love=1;love<=t;love++)
#define PRINT_CASE              printf("Case %d: ",love)
#define LINE_PRINT_CASE         printf("Case %d:\n",z)
#define all(a)                  a.begin(),a.end()
#define SORT(x)                 sort(x.begin(), x.end())
#define REV(x)                  reverse(x.begin(), x.end())
#define DBG0                    cerr << __LINE__ << ": ----" << '\n'
#define DBG(...)                cerr << __LINE__ <<':' << "(" << #__VA_ARGS__ << ")"<< " = ", dbg_out(__VA_ARGS__)
#define GCD(a, b)               __gcd(a, b)
#define lcm(a, b)               (a)*((b)/gcd(a,b))
#define end0                    "\n"
#define end1                    cout<<"\n";
#define Pi                      acos(-1)
#define mod                     1000000007
#define intlim                  2147483648
#define infinity                (1<<28)
#define EPS                     10E-9

//----------------------------------------------------------------
void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
    cerr << ' ' << H;
     dbg_out(T...);
}
//----------------------------------------------------------------

void solve()
{
    ll n,i,j,k,ans=0;
    VI value;
    cin>>n;
    int a[n],b[n],c[n],d[n],e[n];
    lo(i,0,n-1,1)
    {
        cin>>a[i]>>b[i]>>c[i]>>d[i]>>e[i];
    }
    lo(i,0,n-1,1)
    {
        ll zz=0;
        lo(j,0,n-1,1)
        {
            if(i!=j)
            {
                lo(k,0,n-1,1)
                {
                    if(i!=j && i!=k)
                    {
                        ll x=(a[j]-a[i])*(a[k]-a[i])+(b[j]-b[i])*(b[k]-b[i])+(c[j]-c[i])*(c[k]-c[i])+(d[j]-d[i])*(d[k]-d[i])+(e[j]-e[i])*(e[k]-e[i]);
                        if(x>0) zz++;
                    }
                }
            }
        }
        if(n-1==zz){
            ans++;
            value.pb(i+1);
        }
    }

    if(ans!=0){
        cout<<ans<<end0;
        for(auto xyz: value) cout<<xyz<<end0;
    }
    else cout<<ans<<end0;

}

int main()
{
    #ifndef ONLINE_JUDGE
        freopen("input-2.txt","r",stdin);
        //freopen("output-2.txt","w",stdout);
        auto start=high_resolution_clock::now();
    #endif
//----------------------------------------------------------------

    ll t;
    //cin>>t;
    t=1;
    TEST_CASE(t)
    {
        //PRINT_CASE;
        solve();
    }

//----------------------------------------------------------------
    #ifndef ONLINE_JUDGE
        auto stop=high_resolution_clock::now();
        auto duration=duration_cast<microseconds>(stop-start);
        cerr<<"\n(Time:"<<duration.count()/1000000.0<<" Seconds)"<<endl;
    #endif
    return 0;
}


// “We do not remember days, we remember moments.”
// ― Jennifer Niven, All the Bright Places
// "Happiness is a choice and life is beautiful"

#include<bits/stdc++.h>
using namespace std;
using namespace std::chrono;

#pragma GCC                     optimize ("Ofast")
#pragma GCC                     optimize("O3")
#define db                      double
#define ll                      long long
#define ull                     unsigned long long
#define lo(i,a,n,x)             for(i=a;i<=n;i=i+x)
#define loi(i,a,n,x)            for(i=a;i>=n;i=i-x)
#define sc                      scanf
#define pr                      printf
#define ms(a,b)                 memset(a, b, sizeof(a))
#define pb(a)                   push_back(a)
#define pop()                   pop_back()
#define mp                      make_pair
#define VI                      vector <int>
#define PII                     pair <int,int>
#define PLL                     pair <long long,long long>
#define ff                      first
#define ss                      second
#define sqr(x)                  (x)*(x)
#define SZ(a)                   (int)a.size()
#define FAST_CIN                ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stlloop(v)              for(__typeof(v.begin()) it=v.begin();it!=v.end();it++)
#define UNIQUE(v)               (v).erase(unique((v).begin(),(v).end()),(v).end())
#define POPCOUNT(m)             __builtin_popcountll(m)
#define RIGHTMOST(m)            __builtin_ctzll(m)
#define LEFTMOST(x)             (63-__builtin_clzll((x)))
#define ODD(x)                  (((x)&1)==0?(0):(1))
#define TEST_CASE(t)            for(int love=1;love<=t;love++)
#define PRINT_CASE              printf("Case %d: ",love)
#define LINE_PRINT_CASE         printf("Case %d:\n",z)
#define all(a)                  a.begin(),a.end()
#define SORT(x)                 sort(x.begin(), x.end())
#define REV(x)                  reverse(x.begin(), x.end())
#define DBG0                    cerr << __LINE__ << ": ----" << '\n'
#define DBG(...)                cerr << __LINE__ <<':' << "(" << #__VA_ARGS__ << ")"<< " = ", dbg_out(__VA_ARGS__)
#define GCD(a, b)               __gcd(a, b)
#define lcm(a, b)               (a)*((b)/gcd(a,b))
#define end0                    "\n"
#define end1                    cout<<"\n";
#define Pi                      acos(-1)
#define mod                     1000000007
#define intlim                  2147483648
#define infinity                (1<<28)
#define EPS                     10E-9

//----------------------------------------------------------------
void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
    cerr << ' ' << H;
     dbg_out(T...);
}
//----------------------------------------------------------------

void solve()
{
    ll n,i,j,k,ans=0;
    VI value;
    cin>>n;
    int a[n],b[n],c[n],d[n],e[n];
    lo(i,0,n-1,1)
    {
        cin>>a[i]>>b[i]>>c[i]>>d[i]>>e[i];
    }
    if(n>250)
    {
        cout<<"0"<<end0;
        return;
    }
    lo(i,0,n-1,1)
    {
        ll zz=0;
        lo(j,0,n-1,1)
        {
            if(i!=j)
            {
                lo(k,0,n-1,1)
                {
                    if(i!=j && i!=k)
                    {
                        ll x=(a[j]-a[i])*(a[k]-a[i])+(b[j]-b[i])*(b[k]-b[i])+(c[j]-c[i])*(c[k]-c[i])+(d[j]-d[i])*(d[k]-d[i])+(e[j]-e[i])*(e[k]-e[i]);
                        if(x>0) zz++;
                    }
                }
            }
        }
        if(n-1==zz){
            ans++;
            value.pb(i+1);
        }
    }

    if(ans!=0){
        cout<<ans<<end0;
        for(auto xyz: value) cout<<xyz<<end0;
    }
    else cout<<ans<<end0;

}

int main()
{
    #ifndef ONLINE_JUDGE
        freopen("input-2.txt","r",stdin);
        //freopen("output-2.txt","w",stdout);
        auto start=high_resolution_clock::now();
    #endif
//----------------------------------------------------------------

    ll t;
    //cin>>t;
    t=1;
    TEST_CASE(t)
    {
        //PRINT_CASE;
        solve();
    }

//----------------------------------------------------------------
    #ifndef ONLINE_JUDGE
        auto stop=high_resolution_clock::now();
        auto duration=duration_cast<microseconds>(stop-start);
        cerr<<"\n(Time:"<<duration.count()/1000000.0<<" Seconds)"<<endl;
    #endif
    return 0;
}


//ѹ�пδ�
#include<bits/stdc++.h>
using namespace std;
const int MAXN=1e3+10;
int n,s[MAXN][5],ans[MAXN],cnt;
int read(){int sss=0,fff=1;char ccc;ccc=getchar();while(ccc<'0'||ccc>'9'){if(ccc=='-')fff=-1;ccc=getchar();}while(ccc>='0'&&ccc<='9')sss=(sss<<1)+(sss<<3)+(ccc^'0'),ccc=getchar();return sss*fff;}
bool solve(int x)
{
	for(int j=1;j<=n;j++)
		if(x!=j)
			for(int k=1;k<=n;k++)
				if(x!=k&&j!=k)
				{
					int sum=0;
					for(int p=0;p<5;p++)
						sum+=(s[j][p]-s[x][p])*(s[k][p]-s[x][p]);
					if(sum>0) return false;
				}
	return true;
}
int main()
{
//	freopen("123.in","r",stdin);
//	freopen("123.out","w",stdout);
	n=read();
	for(int i=1;i<=n;i++)
		for(int j=0;j<5;j++)
			s[i][j]=read();
	if(n>33)
	{
		printf("%d\n",cnt);
		return 0;
	}
	for(int i=1;i<=n;i++)
		if(solve(i))
			cnt++,ans[cnt]=i;
	printf("%d\n",cnt);
	for(int i=1;i<=cnt;i++)
		printf("%d\n",ans[i]);
    return 0;
}


//ѹ�пδ�
#include<bits/stdc++.h>
using namespace std;
const int MAXN=1e3+10;
int n,s[MAXN][5],ans[MAXN],cnt;
int read(){int sss=0,fff=1;char ccc;ccc=getchar();while(ccc<'0'||ccc>'9'){if(ccc=='-')fff=-1;ccc=getchar();}while(ccc>='0'&&ccc<='9')sss=(sss<<1)+(sss<<3)+(ccc^'0'),ccc=getchar();return sss*fff;}
bool solve(int x)
{
	for(int j=1;j<=n;j++)
		if(x!=j)
			for(int k=1;k<=n;k++)
				if(x!=k&&j!=k)
				{
					int sum=0;
					for(int p=0;p<5;p++)
						sum+=(s[j][p]-s[x][p])*(s[k][p]-s[x][p]);
					if(sum>0) return false;
				}
	return true;
}
int main()
{
//	freopen("123.in","r",stdin);
//	freopen("123.out","w",stdout);
	n=read();
	for(int i=1;i<=n;i++)
		for(int j=0;j<5;j++)
			s[i][j]=read();
	if(n>11)
	{
		printf("%d\n",cnt);
		return 0;
	}
	for(int i=1;i<=n;i++)
		if(solve(i))
			cnt++,ans[cnt]=i;
	printf("%d\n",cnt);
	for(int i=1;i<=cnt;i++)
		printf("%d\n",ans[i]);
    return 0;
}


//ѹ�пδ�
#include<bits/stdc++.h>
using namespace std;
const int MAXN=1e3+10;
int n,s[MAXN][5],ans[MAXN],cnt;
int read(){int sss=0,fff=1;char ccc;ccc=getchar();while(ccc<'0'||ccc>'9'){if(ccc=='-')fff=-1;ccc=getchar();}while(ccc>='0'&&ccc<='9')sss=(sss<<1)+(sss<<3)+(ccc^'0'),ccc=getchar();return sss*fff;}
bool solve(int x)
{
	for(int j=1;j<=n;j++)
		if(x!=j)
			for(int k=1;k<=n;k++)
				if(x!=k&&j!=k)
				{
					int sum=0;
					for(int p=0;p<5;p++)
						sum+=(s[j][p]-s[x][p])*(s[k][p]-s[x][p]);
					if(sum>0)
					{
//						printf("%d %d %d\n",x,j,k);
						return false;
					}
				}
	return true;
}
int main()
{
//	freopen("123.in","r",stdin);
//	freopen("123.out","w",stdout);
	n=read();
	if(n>10)
	{
		printf("%d\n",cnt);
		return 0;
	}
	for(int i=1;i<=n;i++)
		for(int j=0;j<5;j++)
			s[i][j]=read();
	bool flag=false;
	for(int i=1;i<=n;i++)
	{
		if(solve(i))
		{
			cnt++;
			ans[cnt]=i;
		}
	}
	printf("%d\n",cnt);
	for(int i=1;i<=cnt;i++)
		printf("%d\n",ans[i]);
    return 0;
}


//压行课次
#include<bits/stdc++.h>
using namespace std;
const int MAXN=1e3+10;
int n,s[MAXN][5],ans[MAXN],cnt;
int read(){int sss=0,fff=1;char ccc;ccc=getchar();while(ccc<'0'||ccc>'9'){if(ccc=='-')fff=-1;ccc=getchar();}while(ccc>='0'&&ccc<='9')sss=(sss<<1)+(sss<<3)+(ccc^'0'),ccc=getchar();return sss*fff;}
bool solve(int x)
{
	for(int j=1;j<=n;j++)
		if(x!=j)
			for(int k=1;k<=n;k++)
				if(x!=k&&j!=k)
				{
					int sum=0;
					for(int p=0;p<5;p++)
						sum+=(s[j][p]-s[x][p])*(s[k][p]-s[x][p]);
					if(sum>0) return false;
				}
	return true;
}
int main()
{
//	freopen("123.in","r",stdin);
//	freopen("123.out","w",stdout);
	n=read();
	for(int i=1;i<=n;i++)
		for(int j=0;j<5;j++)
			s[i][j]=read();
	if(n>11)
	{
		printf("%d\n",cnt);
		return 0;
	}
	for(int i=1;i<=n;i++)
		if(solve(i))
			cnt++,ans[cnt]=i;
	printf("%d\n",cnt);
	for(int i=1;i<=cnt;i++)
		printf("%d\n",ans[i]);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

mt19937_64 mt_rnd_64(chrono::steady_clock::now().time_since_epoch().count());
long long rnd(long long l, long long r) {
    return (mt_rnd_64() % (r-l+1)) + l;
}

struct Pt{
    int a, b, c, d, e;
};

int n;
vector < Pt > v;

bool notRight(Pt a, Pt b, Pt c){
    return (((b.a - a.a) * (c.a - a.a) + (b.b - a.b) * (c.b - a.b) + (b.c - a.c) * (c.c - a.c) +
        (b.d - a.d) * (c.d - a.d) + (b.e - a.e) * (c.e - a.e)) > 0);
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin >> n;
    vector < int > ans;
    for(int i = 0; i < n; i++){
        int a, b, c, d, e;
        cin >> a >> b >> c >> d >> e;
        v.push_back({a, b, c, d, e});
    }
    for(int i = 0; i < n; i++){
        bool ch = 0;
        for(int j = 0; j < 1000; j++){
            int x = rnd(0, n - 1), y = rnd(0, n - 1);
            if(x != y && x != i && y != i && notRight(v[i], v[x], v[y])){
                ch = 1;
                break;
            }
        }
        if(!ch) ans.push_back(i);
    }
    cout << ans.size() << '\n';
    for(auto it:ans)
        cout << it + 1 << ' ';
}


#include<bits/stdc++.h>

using namespace std;

#define allof(x) (x).begin(), (x).end()

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main(){
    cin.tie(0);
    cin.sync_with_stdio(0);

    int n;
    cin >> n;

    if (n > 100) {
        cout << 0;
        return 0;
    }

    vector<vector<int>> pts(n, vector<int>(5));
    for (vector<int> &v : pts) {
        for (int &i : v) cin >> i;
    }

    vector<int> ans;
    for (int a = 0; a < n; a++) {
        bool good = true;
        for (int b = 0; b < n && good; b++) {
            if (a == b) continue;
            for (int c = 0; c < n; c++) {
                if (a == c || b == c) continue;
                int dot = 0;
                for (int i = 0; i < 5; i++) {
                    dot += (pts[b][i] - pts[a][i]) * (pts[c][i] - pts[a][i]);
                }

                if (dot > 0) {
                    good = false;
                    break;
                }
            }
        }
        if (good) {
            ans.push_back(a + 1);
        }
    }

    cout << ans.size() << "\n";
    for (int i : ans) cout << i << "\n";
}


/***
	chauhan176's code

	Nothing Happens , It's True
***/
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long int
#define ld long double
#define fi first
#define se second
#define mod 1000000007
#define maxn 300005
#define all(v) v.begin(),v.end()
#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define go_t int t;cin>>t;for(int tt=1;tt<=t;tt++)
#define set_ar(arr,v) memset(arr,v,sizeof(arr))
#define trace2(x, y)             cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<< endl;
#define trace3(x, y, z)          cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl;
#define trace4(a, b, c, d)       cout <<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;
#define trace5(a, b, c, d, e)    cout <<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<<": "<<e<<endl;

typedef pair<int,int>pi;
const ll inf = 0x3f3f3f3f3f3f3f3fll;//4x10e18
const int maxx = 10000000;
#define PI 3.14159265
int main()
{
    fastio;
    int n;
    cin>>n;
    int a[n][5];
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<5;j++)
            cin>>a[i][j];
    }
    vector<int>ans;
    for(int i=0;i<n;i++)
    {
        int f=0;
        //cout<<"for :- "<<i<<endl;
        for(int j=0;j<n;j++)
        {
            int x[5];
            int modx=0;
            for(int c=0;c<5;c++)
                x[c] = a[j][c] - a[i][c],modx+=(x[c]*x[c]);
            for(int k=j+1;k<n;k++)
            {
                int y[5];
                int dot=0,mody=0;
                for(int c=0;c<5;c++)
                    y[c] = a[k][c] - a[i][c],dot+=(y[c]*x[c]),mody+=(y[c]*y[c]);

                double den = sqrt(modx) + sqrt(mody);
                double num = double(dot);

                double ang = num/den;
                ang = acos(ang);
                //trace3(j,k,ang);
                ang = (ang/PI)*180;
                if(ang<(90.00) || isnan(ang))
                {
                    f=1;
                    break;
                }
            }
            if(f)
                break;
        }
        if(!f)
            ans.pb(i+1);
    }
    cout<<ans.size()<<endl;
    for(int i : ans)cout<<i<<" ";
    cout<<endl;
    return 0;
}


/***
	chauhan176's code

	Nothing Happens , It's True
***/
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long int
#define ld long double
#define fi first
#define se second
#define mod 1000000007
#define maxn 300005
#define all(v) v.begin(),v.end()
#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define go_t int t;cin>>t;for(int tt=1;tt<=t;tt++)
#define set_ar(arr,v) memset(arr,v,sizeof(arr))
#define trace2(x, y)             cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<< endl;
#define trace3(x, y, z)          cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl;
#define trace4(a, b, c, d)       cout <<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;
#define trace5(a, b, c, d, e)    cout <<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<<": "<<e<<endl;

typedef pair<int,int>pi;
const ll inf = 0x3f3f3f3f3f3f3f3fll;//4x10e18
const int maxx = 10000000;
#define PI 3.14159265
int main()
{
    fastio;
    int n;
    cin>>n;
    int a[n][5];
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<5;j++)
            cin>>a[i][j];
    }
    vector<int>ans;
    for(int i=0;i<n;i++)
    {
        int f=0;
        //cout<<"for :- "<<i<<endl;
        for(int j=0;j<n;j++)
        {
            if(j==i)continue;
            int x[5];
            int modx=0;
            for(int c=0;c<5;c++)
                x[c] = a[j][c] - a[i][c],modx+=(x[c]*x[c]);
            for(int k=j+1;k<n;k++)
            {
                if(k==i)continue;
                int y[5];
                int dot=0,mody=0;
                for(int c=0;c<5;c++)
                    y[c] = a[k][c] - a[i][c],dot+=(y[c]*x[c]),mody+=(y[c]*y[c]);

                double den = sqrt(modx)*sqrt(mody);
                double num = double(dot);

                double ang = num/den;
                ang = acos(ang);
                //trace3(j,k,ang);
                ang = (ang/PI)*180;
                if(ang<(90.00) || isnan(ang))
                {
                    f=1;
                    break;
                }
            }
            if(f)
                break;
        }
        if(!f)
            ans.pb(i+1);
    }
    cout<<ans.size()<<endl;
    for(int i : ans)cout<<i<<" ";
    cout<<endl;
    return 0;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include<bits/stdc++.h>
#define PIE acos(-1)
#define sa(arr,n)    cout<<"-------arr---------\n";rl(i,n)cout<<i<<" "<<arr[i]<<"\n";cout<<"\n";
#define sac(arr,j,n) cout<<"-------arr--------\n";rlc(i,j,n)cout<<i<<" "<<arr[i]<<"\n";cout<<"\n";
#define rlc(i,a,n)     for(int i=a;i<n;i++)   //run_loop
#define rl(i,n)        for(int i=0;i<n;i++)  //run_loop2
#define farr(arr,n)   rl(i,n)cin>>arr[i]   //fill_array
#define farrc(arr,a,n) rlc(i,a,n)cin>>arr[i]
#define ll             long long int
#define ld             long double
#define pb             push_back
#define all(v)         v.begin(),v.end()
#define eb             emplace_back
#define memas(a)        memset(a,-1,sizeof(a))   //memset_assign.
#define ispr(a,x)      a.find(x)!=a.end()        //is_present
#define sz(a)          (int)((a).size())
#define IOS            ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define da(p,t)          p t;cin>>t             //define_assign.
#define da2(p,t1,t2)     p t1,t2; cin>>t1>>t2
#define da3(p,t1,t2,t3)  p t1,t2,t3;cin>>t1>>t2>>t3
#define faar(p,arr,n)   p arr[n]; rl(i,n)cin>>arr[i]
#define edl             "\n"
#define lb(a,x) lower_bound(all(a),x)
#define ub(a,x) upper_bound(all(a),x)
#define make_unique(vec) sort(all(vec));vec.erase(unique(all(vec)),vec.end())
const double eps=1e-10;
const float epsf=1e-6;
using namespace std;

inline ll __gcd(ll a,ll b){if(a==0||b==0){return max(a,b);}ll tempa,tempb;while(1){if(a%b==0)return b;else{tempa=a;tempb=b;a=tempb;b=tempa%tempb;}}}
inline int compfloat(float& x, float& y){if(fabs(x - y) < epsf)return 0;else if(x-y>0)return 1;return -1;}
inline int compdouble(double x, double y){if(fabs(x - y) < eps)return 0;else if(x-y>0)return 1;else return -1;}
bool prime(ll k){for(ll i=2;i*i<=k;i++)if(k%i==0){return false;}return true;}
void pdash(int n=1){for(int i=0;i<n;i++){for(int j=0;j<30;j++){cout<<"-";}cout<<edl;}}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void solve()
{
    int n;cin>>n;int arr[n][5];
    for(int i=0;i<n;i++)for(int j=0;j<5;j++)cin>>arr[i][j];
    set<int >st;
    for(int i=0;i<n;i++)st.insert(i);
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<n;j++)
        {
            if(j!=i)
            {
                for(int k=0;k<n;k++)
                {
                if(k!=i && k!=j)
                {
                    ll ans=0;
                    for(int l=0;l<5;l++)
                    {
                        ans+=(arr[j][l]-arr[i][l])*(arr[k][l]-arr[i][l]);
                    }
                    if(ans>0){st.erase(i);goto abc;}
                }
                }
            }

        }
    abc:;
    }
    cout<<st.size()<<edl;
    for(auto& j: st)cout<<j+1<<" ";
    cout<<edl;

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int main(){
        IOS;
        int t=1;
//        cin>>t;
    while(t--){
        solve();}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <functional>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <numeric>
#include <math.h>

using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);

	int n, i, j, k, a, b, c;
	cin >> n;
	vector<vector<int>> v(n, vector<int>(5));
	vector<int> ans;
	for (i = 0; i < n; i++) cin >> v[i][0] >> v[i][1] >> v[i][2] >> v[i][3] >> v[i][4];

	for (a = 0; a < n; a++) {
		bool valid = true;
		for (b = 0; b < n; b++) {
			if (a == b) continue;
			for (c = b + 1; c < n; c++) {
				if (c == a) continue;

				int xy = 0, xx = 0, yy = 0;
				for (i = 0; i < 5; i++) {
					xy += (v[b][i] - v[a][i]) * (v[c][i] - v[a][i]);
					xx += (v[b][i] - v[a][i]) * (v[b][i] - v[a][i]);
					yy += (v[c][i] - v[a][i]) * (v[c][i] - v[a][i]);
				}

				//long double g = xy * 1.0 / (sqrt(xx * yy)), aa = acos(g);
				//if (aa < 3.1415926 / 2) {
				//	valid = false;
				//	goto outer;
				//}
				if (xy > 0) {
					valid = false;
					goto outer;
				}
			}
		}
	outer:
		if (valid) ans.push_back(a + 1);
	}

	cout << ans.size() << "\n";
	for (auto p : ans) cout << p << "\n";

	return 0;
}


#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <functional>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <numeric>
#include <math.h>

using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);

	int n, i, j, k, a, b, c;
	cin >> n;
	vector<vector<int>> v(n, vector<int>(5));
	vector<int> ans;
	for (i = 0; i < n; i++) cin >> v[i][0] >> v[i][1] >> v[i][2] >> v[i][3] >> v[i][4];

	for (a = 0; a < n; a++) {
		bool valid = true;
		for (b = 0; b < n; b++) {
			if (a == b) continue;
			for (c = b + 1; c < n; c++) {
				if (c == a) continue;

				int xy = 0, xx = 0, yy = 0;
				for (i = 0; i < 5; i++) {
					xy += (v[b][i] - v[a][i]) * (v[c][i] - v[a][i]);
					xx += (v[b][i] - v[a][i]) * (v[b][i] - v[a][i]);
					yy += (v[c][i] - v[a][i]) * (v[c][i] - v[a][i]);
				}

				long double g = xy * 1.0 / (sqrt(xx * yy)), aa = acos(g);
				if (aa < 3.1415926 / 2) {
					valid = false;
					goto outer;
				}
			}
		}
	outer:
		if (valid) ans.push_back(a + 1);
	}

	cout << ans.size() << "\n";
	for (auto p : ans) cout << p << "\n";

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define fi first
#define se second

typedef long long lli;
typedef pair<int, int> ii;
typedef pair<lli, lli> ll;

int main() {
	int n, c[1005][10], x[10], y, temp, ans = 0;
	bool valid[1005];
	vector<int> v;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
		for (int j = 0; j < 5; j++)
			scanf("%d", &c[i][j]);
	memset(valid, true, sizeof valid);
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (!valid[i])
				break;
			if (i == j)
				continue;
			for (int k = 0; k < 5; k++)
				x[k] = c[j][k] - c[i][k];
			for (int k = j + 1; k < n; k++) {
				if (!valid[i])
					break;
				if (i == k)
					continue;
				temp = 0;
				for (int l = 0; l < 5; l++) {
					y = c[k][l] - c[i][l];
					temp += (y * x[l]);
				}
				if (temp > 0) {
					valid[i] = false;
					break;
				}
				else
					valid[j] = valid[k] = false;
			}
		}
		if (valid[i]) {
			v.pb(i + 1);
			ans++;
		}
	}
	printf("%d\n", ans);
	if (ans)
		for (int i = 0; i < ans; i++)
			printf("%d%c", v[i], (i < ans - 1) ? ' ' : '\n');
	return 0;
}


#include <cstdio>
#include <queue>
#include <array>
#include <algorithm>
using namespace std;

long long dist(array <long long, 5> a, array <long long, 5> b){
	return
		(a[0]-b[0])*(a[0]-b[0])+
		(a[1]-b[1])*(a[1]-b[1])+
		(a[2]-b[2])*(a[2]-b[2])+
		(a[3]-b[3])*(a[3]-b[3])+
		(a[4]-b[4])*(a[4]-b[4]);
}
int main(){
	int n;
	scanf("%d", &n);
	if(n>11){
		printf("0\n");
	}else{
		vector <array <long long, 5> > coords(n);
		for(int i = 0;i < n;i ++)
			for(int j = 0;j < 5;j ++)
				scanf("%lld", &coords[i][j]);
		vector <int> sett(n);
		for(int i = 0;i < n;i ++)
			sett[i]=i;
		while(sett.size()>=3){
			long long
				a=dist(coords[sett[0]], coords[sett[1]]),
				b=dist(coords[sett[1]], coords[sett[2]]),
				c=dist(coords[sett[2]], coords[sett[0]]);
			if(a<b+c){
				swap(sett[2], sett.back());
				sett.pop_back();
			}
			if(c<a+b){
				swap(sett[1], sett.back());
				sett.pop_back();
			}
			if(b<a+c){
				swap(sett[0], sett.back());
				sett.pop_back();
			}
		}
		vector <int> ans;
		for(int i: sett){
			bool good=true;
			for(int j = 0;j < n;j ++){
				if(j==i)
					continue;
				for(int k = 0;k < j;k ++){
					if(k==i)
						continue;
					long long
						a=dist(coords[i], coords[j]),
						b=dist(coords[j], coords[k]),
						c=dist(coords[k], coords[i]);
					if(b<a+c){
						good=false;
						j=k=n;
					}
				}
			}
			if(good){
				ans.push_back(i);
			}
		}
		sort(ans.begin(), ans.end());
		printf("%lu\n", ans.size());
		if(!ans.empty()){
			for(int i = 0;i < ans.size();i ++){
				printf("%d%c", ans[i]+1, i==ans.size()-1?'\n':' ');
			}
		}
	}
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
	int a[1001][5];
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < 5; j++)
		{
			cin >> a[i][j];
		}
	}
	vector<int> result;
	for (int i = 0; i < n; i++)
	{
		int bad = 0;
		for (int j = 0; j < n && !bad; j++)
		{

			for (int k = j + 1; k < n; k++)
			{
				int sum = 0;
				for (int p = 0; p < 5; p++)
				{
					sum += (a[k][p] - a[i][p])*(a[j][p] - a[i][p]);
				}
				if (sum > 0)
				{
					bad = 1;
					break;
				}
			}
		}
		if (!bad)
		{
			result.push_back(i+1);
		}
	}

	cout << result.size() << endl;
	for each (auto i in result)
	{
		cout << i << " ";
	}
}


#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cstdio>
using namespace std;
struct node
{
	int val[5];
};
bool is_px(node a,node b)
{
	for(int i=0; i<5; i++)
	{
		for(int j=i+1; j<5; j++)
		{
			if(a.val[i]*b.val[j]!=a.val[j]*b.val[i])
				return false;
		}
	}
	for(int i=0; i<5; i++)
	{
	   if(a.val[i]!=0)
	   {
	      if(1.0*a.val[i]/b.val[i]<0)
	      return false;
	   }
	}
	return true;
}
node vec_ab(node a, node b)
{
    for(int i=0; i<5; i++)
		a.val[i]=b.val[i]-a.val[i];
	return a;
}
int product(node x,node y)
{
	int sum=0;
	for(int i=0; i<5; i++)
	{
		sum+=x.val[i]*y.val[i];
	}
	return sum;
}
bool is_rijiao(node a,node b, node c)
{
	node ab=vec_ab(a,b);
	node ac=vec_ab(a,c);
	int p=product(ab,ac);
	if(p <= 0)
		return false;
	if(is_px(ab,ac))
		return false;
	return true;
}
node no[1005];
int n,b[1005],ans;
vector<node> v;
int main()
{
	cin >> n;
	ans=n;
	for(int i=0; i<n; i++)
	{
		for(int j=0; j<5; j++)
			cin >> no[i].val[j];
	}

	for(int i=0; i<n; i++)
	{
		v.clear();
		int bad=0;
		for(int j=0; j<n; j++)
		{
			if(i==j)continue;
			int flag=1;
			for(int k=0; k<v.size(); k++)//检索j是否是有效点
			{
				if(is_px(vec_ab(no[i],no[j]),vec_ab(no[i],v[k])))
				{
					flag=0;
					break;
				}
			}

			if(flag)
			{
				v.push_back(no[j]);
				if(v.size()>10)
				{
					bad=1;
					break;
				}
			}
		}
		if(bad)
		{
			b[i]=1;
			ans--;
			continue;
		}
		for(int j=0; j<v.size(); j++)
		{
			for(int k=j+1; k<v.size(); k++)
			{
				if(is_rijiao(no[i],v[j],v[k]))
				{
					bad=1;
					break;
				}
			}
			if(bad)
				break;
		}
		if(bad)
		{
			b[i]=1;
			ans--;
		}
	}
	cout << ans << endl;
	for(int i=0; i<n; i++)
	{
		if(b[i]!=1)
		cout << i+1 << endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cstdio>
using namespace std;
struct node
{
	int val[5];
};
bool is_px(node a,node b)
{
	for(int i=0; i<5; i++)
	{
		for(int j=i+1; j<5; j++)
		{
			if(a.val[i]*b.val[j]!=a.val[j]*b.val[i])
				return false;
		}
	}
	return true;
}
node vec_ab(node a, node b)
{
    for(int i=0; i<5; i++)
		a.val[i]=b.val[i]-a.val[i];
	return a;
}
int product(node x,node y)
{
	int sum=0;
	for(int i=0; i<5; i++)
	{
		sum+=x.val[i]*y.val[i];
	}
	return sum;
}
bool is_rijiao(node a,node b, node c)
{
	node ab=vec_ab(a,b);
	node ac=vec_ab(a,c);
	int p=product(ab,ac);
	if(p <= 0)
		return false;
	if(is_px(ab,ac))
		return false;
	return true;
}
node no[1005];
int n,b[1005],ans;
vector<node> v;
int main()
{
	cin >> n;
	ans=n;
	for(int i=0; i<n; i++)
	{
		for(int j=0; j<5; j++)
			cin >> no[i].val[j];
	}

	for(int i=0; i<n; i++)
	{
		v.clear();
		int bad=0;
		for(int j=0; j<n; j++)
		{
			if(i==j)continue;
			int flag=1;
			for(int k=0; k<v.size(); k++)//检索j是否是有效点
			{
				if(is_px(vec_ab(no[i],no[j]),vec_ab(no[i],v[k])))
				{
					flag=0;
					break;
				}
			}

			if(flag)
			{
				v.push_back(no[j]);
				if(v.size()>10)
				{
					bad=1;
					break;
				}
			}
		}
		if(bad)
		{
			b[i]=1;
			ans--;
			continue;
		}
		for(int j=0; j<v.size(); j++)
		{
			for(int k=j+1; k<v.size(); k++)
			{
				if(is_rijiao(no[i],v[j],v[k]))
				{
					bad=1;
					break;
				}
			}
			if(bad)
				break;
		}
		if(bad)
		{
			b[i]=1;
			ans--;
		}
	}
	cout << ans << endl;
	for(int i=0; i<n; i++)
	{
		if(b[i]!=1)
		cout << i+1 << endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cstdio>
using namespace std;
struct node
{
	int val[5];
};
bool is_px(node a,node b)
{
	for(int i=0; i<5; i++)
	{
		for(int j=i+1; j<5; j++)
		{
			if(a.val[i]*b.val[j]!=a.val[j]*b.val[i])
				return false;
		}
	}
	return true;
}
node vec_ab(node a, node b)
{
    for(int i=0; i<5; i++)
		a.val[i]=b.val[i]-a.val[i];
	return a;
}
int product(node x,node y)
{
	int sum=0;
	for(int i=0; i<5; i++)
	{
		sum+=x.val[i]*y.val[i];
	}
	return sum;
}
bool is_rijiao(node a,node b, node c)
{
	node ab=vec_ab(a,b);
	node ac=vec_ab(a,c);
	int p=product(ab,ac);
	if(p <= 0)
		return false;
	if(is_px(ab,ac))
		return false;
	return true;
}
node no[1005];
int n,b[1005],ans;
vector<node> v;
int main()
{
	cin >> n;
	ans=n;
	for(int i=0; i<n; i++)
	{
		for(int j=0; j<5; j++)
			cin >> no[i].val[j];
	}

	for(int i=0; i<n; i++)
	{
		v.clear();
		int bad=0;
		for(int j=0; j<n; j++)
		{
			if(i==j)continue;
			int flag=1;
			for(int k=0; k<v.size(); k++)//检索j是否是有效点
			{
				if(is_px(vec_ab(no[i],no[j]),vec_ab(no[i],v[k])))
				{
					flag=0;
					break;
				}
			}

			if(flag)
			{
				v.push_back(no[j]);
				if(v.size()>10)
				{
					bad=1;
					break;
				}
			}
		}
		if(bad)
		{
			b[i]=1;
			ans--;
			continue;
		}
		for(int j=0; j<v.size(); j++)
		{
			for(int k=j+1; k<v.size(); k++)
			{
				if(is_rijiao(no[i],v[j],v[k]))
				{
					bad=1;
					break;
				}
			}
			if(bad)
				break;
		}
		if(bad)
		{
			b[i]=1;
			ans--;
		}
	}
	cout << ans << endl;
	for(int i=0; i<n; i++)
	{
		if(b[i]!=1)
		cout << i+1;
	}
	return 0;
}


#include<iostream>
using namespace std;
int n,b[15];
struct node{
	int val[5];
}a[1100];
bool isok(node x,node y,node l)
{
	node o,p;
	int sum=0;
	for(int i=0;i<5;i++)
	{
		o.val[i]=y.val[i]-x.val[i];
		p.val[i]=l.val[i]-x.val[i];
	}
	for(int i=0;i<5;i++)
	{
		sum+=o.val[i]*p.val[i];
		}
	if(sum<=0)
	return false;
	return true;
}
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i].val[0]>>a[i].val[1]>>a[i].val[2]>>a[i].val[3]>>a[i].val[4];
	}
	if(n>11)
	cout<<"0"<<endl;
	else
	{
		for(int i=0;i<n;i++)
		for(int j=0;j<n;j++)
		for(int k=0;k<n;k++)
		{
			if(i==j||i==k||j==k)continue;
			if(isok(a[i],a[j],a[k]))
			{
				b[i]=1;
		        break;
			}
		}
		int tot=0;
		for(int i=0;i<n;i++)
		{
			if(b[i]==0)
			tot++;
		}
		cout<<tot<<endl;
		for(int i=0;i<n;i++)
		if(b[i]==0)
		cout<<i+1<<endl;
	}
 }


#include<iostream>
using namespace std;
int n,b[15];
struct node{
	int val[5];
}a[1100];
bool isok(node x,node y,node l)
{
	node o,p;
	int sum=0;
	for(int i=0;i<5;i++)
	{
		o.val[i]=y.val[i]-x.val[i];
		p.val[i]=l.val[i]-x.val[i];
	}
	for(int i=0;i<5;i++)
	{
		sum+=o.val[i]*p.val[i];
		}
	if(sum<=0)
	return false;
	return true;
}
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i].val[0]>>a[i].val[1]>>a[i].val[2]>>a[i].val[3]>>a[i].val[4];
	}
	if(n>11)
	cout<<"0"<<endl;
	else
	{
		for(int i=0;i<n;i++)
		for(int j=0;j<n;j++)
		for(int k=0;k<n;k++)
		{
			if(i==j||i==k||j==k)continue;
			if(isok(a[i],a[j],a[k]))
			b[i]=1;
			break;
		}
		int tot=0;
		for(int i=0;i<n;i++)
		{
			if(b[i]==0)
			tot++;
		}
		cout<<tot<<endl;
		for(int i=0;i<n;i++)
		if(b[i]==0)
		cout<<i+1<<endl;
	}
 }


#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cstdio>
using namespace std;
struct node
{
	int val[5];
};
bool is_px(node a,node b)
{
	for(int i=0; i<5; i++)
	{
		for(int j=i+1; j<5; j++)
		{
			if(a.val[i]*b.val[j]!=a.val[j]*b.val[i])
				return false;
		}
	}
	for(int i=0; i<5; i++)
	{
	   if(a.val[i]!=0)
	   {
	      if(1.0*a.val[i]/b.val[i]<0)
	      return false;
	   }
	}
	return true;
}
node vec_ab(node a, node b)
{
    for(int i=0; i<5; i++)
		a.val[i]=b.val[i]-a.val[i];
	return a;
}
int product(node x,node y)
{
	int sum=0;
	for(int i=0; i<5; i++)
	{
		sum+=x.val[i]*y.val[i];
	}
	return sum;
}
bool is_rijiao(node a,node b, node c)
{
	node ab=vec_ab(a,b);
	node ac=vec_ab(a,c);
	int p=product(ab,ac);
	if(p <= 0)
		return false;
	return true;
}
node no[1005];
int n,b[1005],ans;
vector<node> v;
int main()
{
	cin >> n;
	ans=n;
	for(int i=0; i<n; i++)
	{
		for(int j=0; j<5; j++)
			cin >> no[i].val[j];
	}
	if(n>11)
	{
	  cout << 0;
	  return 0;
    }
    else if( n<3 )
    {

	}
	else
	{
	    for(int i=0; i<n; i++)
		   for(int j=0; j<n; j++)
		     for(int k=0; k<n; k++)
		     {
			    if(i==j || i==k || j==k)continue;
			    if(is_rijiao(no[i],no[j],no[k]))
			    {
				   b[i]=1;
				   break;
				}
			 }

	}
	for(int i=0; i<n; i++)
	{
	   if(b[i])
	   {
	     ans--;
	   }
	}

	cout << ans << endl;
	for(int i=0; i<n; i++)
	{
		if(b[i]!=1)
		cout << i+1 << endl;
	}
	return 0;
}


#include <iostream>
#include <cmath>
#define PI 3.1415926

using namespace std;

struct punct
{
	int a, b, c, d, e;
};

int n, rez, sol[1005];
punct v[1005];

punct vect(punct x, punct y)
{
	punct aux;

	aux.a = y.a - x.a;
	aux.b = y.b - x.b;
	aux.c = y.c - x.c;
	aux.d = y.d - x.d;
	aux.e = y.e - x.e;
	return aux;
}

int unghi(punct x, punct y, punct z);
double cs(punct v1, punct v2);

int main()
{
	int i, j, k, ok = 1;

	cin >> n;
	for (i = 1; i <= n; i++)
		cin >> v[i].a >> v[i].b >> v[i].c >> v[i].d >> v[i].e;
	for (i = 1; i <= n; i++)
	{
		ok = 1;
		for (j = 1; j <= n && ok; j++)
		{
			if (j == i)
				continue;
			for (k = 1; k <= n && ok; k++)
			{
				if (k == j || k == i)
					continue;
				ok = unghi(v[i], v[j], v[k]);
			}
		}
		rez += ok;
		if (ok)
			sol[rez] = i;
	}
	cout << rez << '\n';
	for (i = 1; i <= rez; i++)
		cout << sol[i] << ' ';
	cout << '\n';
	return 0;
}

int unghi(punct x, punct y, punct z)
{
	double cos, aux;
	punct v1, v2;

	v1 = vect(x, y);
	v2 = vect(x, z);
	cos = cs(v1, v2) / (sqrt(cs(v1,v1)*cs(v2,v2)));
	aux = acos(cos);
	return (acos(cos) - PI/2.0) >= -0.001;
}

double cs(punct v1, punct v2)
{
	return v1.a*v2.a + v1.b*v2.b + v1.c*v2.c + v1.d*v2.d + v1.e*v2.e;
}


#pragma comment(linker, "/STACK:512000000")
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cassert>
#include <sstream>

using namespace std;

#define forn(i, n) for (int i = 0; i < int(n); i++)
#define for1(i, n) for (int i = 1; i <= int(n); i++)
#define forv(i, v) forn(i, v.size())

#define all(x) x.begin(), x.end()
#define pb push_back
#define mp make_pair

#define CIN_FILE "input.txt"
#define COUT_FILE "output.txt"

typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;

const int NMAX = 1005;

int n;
int x[NMAX][5];

bool angle(int i, int j, int k)
{
	int sum = 0;
	forn(s, 5)
		sum += (x[j][s] - x[i][s]) * (x[k][s] - x[i][s]);
	return sum > 0;
}
int main()
{

    scanf("%d", &n);
    forn(i, n)
    	forn(j, 5)
    		scanf("%d", &x[i][j]);

    vector<int> ans;
    forn(i, n)
    {
    	bool good = true;
    	forn(j, n)
    	{
    		if (j == i) continue;
    		forn(k, j)
    		{
    			if (k == i) continue;
    			if (angle(i, j, k))
    			{
    				good =  false;
    				break;
    			}
    		}
    		if (!good) break;
    	}
    	if (good) ans.pb(i + 1);
    }

    cout << ans.size() << endl;
    forv(i, ans)
    {
    	if (i) cout << " ";
    	cout << ans[i];
    }
    cout << endl;

    return 0;
}


#include<set>
#include<map>
#include<list>
#include<queue>
#include<stack>
#include<string>
#include<math.h>
#include<time.h>
#include<vector>
#include<bitset>
#include<memory>
#include<utility>
#include<fstream>
#include<stdio.h>
#include<sstream>
#include<iostream>
#include<stdlib.h>
#include<string.h>
#include<algorithm>
using namespace std;
int a[25],b[25],c[25],d[25],e[25];
int main()
{
    #ifdef absi2011
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    int n;
    scanf("%d",&n);
    if (n>15)
    {
        puts("0");
        return 0;
    }
    int i;
    for (i=0;i<n;i++)
    {
        scanf("%d%d%d%d%d",&a[i],&b[i],&c[i],&d[i],&e[i]);
    }
    vector<int> ans;
    for (i=0;i<n;i++)
    {
        int j;
        int k;
        for (j=0;j<n;j++)
        {
            for (k=0;k<n;k++)
            {
                if ((i==j)||(j==k)||(k==i)) continue;
                int sum=0;
                sum=(a[j]-a[i])*(a[k]-a[i])+(b[j]-b[i])*(b[k]-b[i])+(c[j]-c[i])*(c[k]-c[i])+(d[j]-d[i])*(d[k]-d[i])+(e[j]-e[i])*(e[k]-e[i]);
                if (sum>0) break;
            }
            if (k!=n) break;
        }
        if (j==n) ans.push_back(i);
    }
    printf("%d\n",ans.size());
    for (i=0;i<ans.size();i++)
    {
        printf("%d\n",ans[i]+1);
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>

using namespace std;

#define PI 3.14159265
//	param = 0.5;
//	result = acos(param) * 180.0 / PI;

int main() {
	int n;
	vector<int> x1, x2, x3, x4, x5;
	cin >> n;
	vector<int> ansidx;
	for (int i = 0; i < n; i++) {
		int a, b, c, d, e;
		cin >> a >> b >> c >> d >> e;
		x1.push_back(a);
		x2.push_back(b);
		x3.push_back(c);
		x4.push_back(d);
		x5.push_back(e);
	}
	if (n > 32)cout << 0 << endl;
	else {
		for (int i = 0; i < n; i++) {
			//checking point i
			bool check = true;
			for (int j = 0; j < n; j++) {
				for (int k = j + 1; k < n; k++) {
					//vector ij and vector ik
					long long pdot1 = (x1[j] - x1[i])*(x1[j] - x1[i]) + (x2[j] - x2[i])*(x2[j] - x2[i]) + (x3[j] - x3[i])*(x3[j] - x3[i]) + (x4[j] - x4[i])*(x4[j] - x4[i]) + (x5[j] - x5[i])*(x5[j] - x5[i]);
					long long pdot2 = (x1[k] - x1[i])*(x1[k] - x1[i]) + (x2[k] - x2[i])*(x2[k] - x2[i]) + (x3[k] - x3[i])*(x3[k] - x3[i]) + (x4[k] - x4[i])*(x4[k] - x4[i]) + (x5[k] - x5[i])*(x5[k] - x5[i]);
					long long dot = (x1[j] - x1[i])*(x1[k] - x1[i]) + (x2[j] - x2[i])*(x2[k] - x2[i]) + (x3[j] - x3[i])*(x3[k] - x3[i]) + (x4[j] - x4[i])*(x4[k] - x4[i]) + (x5[j] - x5[i])*(x5[k] - x5[i]);
					double ang = acos((dot + 0.0) / (pdot1 + pdot2 + 0.0))* 180.0 / PI;
					if (ang < 90 && abs(ang - 90.0) > 0.001) {
						check = false;
						break;
					}
				}
				if (!check)break;
			}
			if (check)ansidx.push_back(i + 1);
		}
		cout << ansidx.size() << endl;
		for (int i = 0; i < ansidx.size(); i++) {
			cout << ansidx[i] << endl;
		}
	}
	//system("pause");
	return 0;

}


#include <functional>
#include <algorithm>
#include <iostream>
#include <memory.h>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <assert.h>
#include <bitset>
#include <string>
#include <cstdio>
#include <math.h>
#include <complex>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <set>
#include <bitset>
#include <map>
using namespace std;

#define int64 long long
#define mp make_pair
#define ull unsigned long long

#ifdef _DEBUG
	const int N = 101;
#else
	const int N = 500000;
#endif
const int M = 70;
const int C = 300;

const int MOD = 1e9+7;

struct Point
{
	int x[5];
	Point()
	{
		for (int i = 0; i < 5; i++) x[i]= 0;
	}
};

int n;
Point a[N];
vector <int> res;

Point diff(const Point &a, const Point &b)
{
	Point res = Point();
	for (int i = 0; i < 5; i++) res.x[i] = a.x[i] - b.x[i];
	return res;
}

bool check(const Point &a, const Point &b)
{
	int val = 0;
	for (int i = 0; i < 5; i++) val += a.x[i] * b.x[i];
	return (val > 0);
}

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < 5; j++) scanf("%d", &a[i].x[j]);
	}
	int ans = 0;
	if (n <= C)
	{
		for (int i = 0; i < n; i++)
		{
			bool flag = true;
			for (int j = 0; j < n; j++)
			{
				for (int k = j + 1; k < n; k++)
				{
					if (j == i || k == i) continue;
					if (check(diff(a[j], a[i]), diff(a[k], a[i])))
					{
						flag = false;
						break;
					}
				}
			}
			if (flag)
			{
				ans++;
				res.push_back(i + 1);
			}
		}
	}
	cout << ans << endl;
	for (int i = 0; i < res.size(); i++) cout << res[i] << " ";

	return 0;
}


 #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#define fo(i,x,y) for(int i=x; i<y; ++i)
#define of(i,x,y) for(int i=x; i>=y; --i)
#define mii map<int,int>
#define mll map<long long,long long>
#define msi map<string,int>
#define mmii multimap<int,int>
#define mmll multimap<long long,long long>
#define mmsi multimap<string,int>
#define si set<int>
#define sll set<long long>
#define ssi multiset<int>
#define sss multiset<string>
#define ssl multiset<long long>
#define sci(x) scanf("%i",&x)
#define scl scanf("\n")
#define scll(x) scanf("%I64d",&x)
#define scd(x) scanf("%d",&x)
#define X first
#define Y second
#include<stdio.h>
#include<iostream>
#include<map>
#include<vector>
#include<set>
#include<math.h>
#include<deque>
#include<cmath>
#include<algorithm>
#include<string>
#include<string.h>
#include<time.h>
#include<queue>
using namespace std;
int x[1010][5], a[1010], ans, n;
int main(){
	cin.sync_with_stdio(false);
	cin>>n;
	ans = n;
	fo(i, 0, n)
		fo(j, 0, 5)
			cin>>x[i][j];
	fo(i, 0, n){
		fo(j, 0, n){
			if(i == j)
				continue;
			bool f;
			fo(k, 0, n){
				if(j == k || i == k)continue;
				int dij[5], dik[5];
				int sc = 0;
				fo(l, 0, 5){
					dij[l] = x[j][l] - x[i][l];
					dik[l] = x[k][l] - x[i][l];
					sc += dij[l] * dik[l];
				}
				if(sc > 0){
					a[i] = 1;
					f = false;
					ans--;
					break;
				}
			}
			if(!f){
				f = true;
				break;
			}
		}
	}
	cout<<ans<<endl;
	fo(i, 0, n)
		if(!a[i])
			cout<<i+1<<" ";
	return 0;
}


 #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#define fo(i,x,y) for(int i=x; i<y; ++i)
#define of(i,x,y) for(int i=x; i>=y; --i)
#define mii map<int,int>
#define mll map<long long,long long>
#define msi map<string,int>
#define mmii multimap<int,int>
#define mmll multimap<long long,long long>
#define mmsi multimap<string,int>
#define si set<int>
#define sll set<long long>
#define ssi multiset<int>
#define sss multiset<string>
#define ssl multiset<long long>
#define sci(x) scanf("%i",&x)
#define scl scanf("\n")
#define scll(x) scanf("%I64d",&x)
#define scd(x) scanf("%d",&x)
#define X first
#define Y second
#include<stdio.h>
#include<iostream>
#include<map>
#include<vector>
#include<set>
#include<math.h>
#include<deque>
#include<cmath>
#include<algorithm>
#include<string>
#include<string.h>
#include<time.h>
#include<queue>
using namespace std;
int x[1010][5], a[1010], ans, n;
int main(){
	cin.sync_with_stdio(false);
	cin>>n;
	ans = n;
	fo(i, 0, n)
		fo(j, 0, 5)
			cin>>x[i][j];
	fo(i, 0, n){

		fo(j, 0, n){
			bool f;
			fo(k, 0, n){
				if(i == j || j == k || i == k)continue;
				int dij[5], dik[5];
				int sc = 0;
				fo(l, 0, 5){
					dij[l] = x[j][l] - x[i][l];
					dik[l] = x[k][l] - x[i][l];
					sc += dij[l] * dik[l];
				}
				if(sc > 0){
					a[i] = 1;
					f = false;
					ans--;
					break;
				}
			}
			if(!f)break;
		}
	}
	cout<<ans<<endl;
	fo(i, 0, n)
		if(!a[i])
			cout<<i+1<<" ";
	return 0;
}


#include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;
#define N 123456
int n, m;
struct ac {
	int a, b, c, d, e;
}t[100];
int ans[100];
double xcy(ac x, ac y) {
	double xy = x.a * y.a + x.b * y.b + x.c *y.c + x.d*y.d + x.e*y.e;
	return xy;
}
bool wf(int i, int j, int k) {
	ac x, y;
	x.a = t[i].a - t[k].a;
	x.b = t[i].b - t[k].b;
	x.c = t[i].c - t[k].c;
	x.d = t[i].d - t[k].d;
	x.e = t[i].e - t[k].e;
	y.a = t[j].a - t[k].a;
	y.b = t[j].b - t[k].b;
	y.c = t[j].c - t[k].c;
	y.d = t[j].d - t[k].d;
	y.e = t[j].e - t[k].e;
	double xy = xcy(x, y);
	double xl = xcy(x, x);
	double yl = xcy(y, y);
	double cos = xy / sqrt(xl) / sqrt(yl);
	//cos = acos(cos);
	return cos < 1e-6;
}
void solve() {
	int i, j, k;
	m = 0;
	for (j = 0; j < n; j++) {
		i = j % 100;
		scanf("%d %d %d %d %d", &t[i].a, &t[i].b, &t[i].c, &t[i].d, &t[i].e);
	}
	if (n > 35) {
		printf("0\n");
		return;
	}
	for (k = 0; k < n; k++) {
		bool flag = true;
		for (i = 0; i < n && flag; i++) {
			if (k == i)continue;
			for (j = i + 1; j < n && flag; j++) {
				if (j == k)continue;
				flag &= wf(i, j, k);
			}
		}
		if (flag) {
			ans[m++] = k + 1;
		}
	}
	printf("%d\n", m);
	if (m > 0) {
		for (i = 0; i < m; i++) {
			printf("%d ", ans[i]);
		}
		printf("\n");
	}
}
int main() {
	while (scanf("%d", &n) != EOF) {
		solve();
	}
	return 0;
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <string>
using namespace std;

double p[1100][5];
int N;

bool judge(int id) {
    for (int i = 0; i < N; i++) {
        if (id == i)   continue;
        for (int j = i + 1; j < N; j++) {
            if (id == j)   continue;
            double a, b, c;
            a = b = c = 0;
            for (int k = 0; k < 5; k++) {
                a += (p[i][k] - p[id][k]) * (p[j][k] - p[id][k]);
                b += (p[i][k] - p[id][k]) * (p[i][k] - p[id][k]);
                c += (p[j][k] - p[id][k]) * (p[j][k] - p[id][k]);
            }
            b = sqrt(b);
            c = sqrt(c);
            a = a / b / c;
            if (a > 0 && a < 1) {
                return false;
            }
        }
    }
    return true;
}

int main() {
    cin >> N;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < 5; j++) {
            cin >> p[i][j];
        }
    }
    if (N > 11) {
        cout << 0 << endl;
    }
    else {
        bool mark[11];
        int cnt = 0;
        memset(mark, false, sizeof(mark));
        for (int i = 0; i < N; i++) {
            if (judge(i)) {
                mark[i] = true;
                cnt++;
            }
        }
        cout << cnt << endl;
        for (int i = 0; i < N; i++) {
            if (mark[i]) {
                cout << i + 1 << endl;
            }
        }
    }
    return 0;
}


#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <stdlib.h>
#include <math.h>
#include <string>
#include <time.h>
#include <string.h>
#include <queue>
#include <stack>
#define sz size()
#define pb push_back
using namespace std;
typedef long long int ll;
ll mod=1e9+7;
ll exp(ll t,ll x){if(x==0) return 1;if(x==1) return t;if(x%2==1) return (t*exp((t*t)%mod,x/2))%mod;if(x%2==0) return exp((t*t)%mod,x/2);}
ll gcd(ll x,ll y){return x%y==0?y:gcd(y,x%y);}
ll lcm(ll x,ll y){return x*(y/gcd(x,y));}
ll bsum(ll u,ll b){return u<b?u:bsum(u/b,b)+u%b;}
ll prival(ll u,ll p){int cn=0;while(u%p==0){cn++;u=u/p;}return cn;}
bool isprime(ll x){for(ll i=2;i*i<=x;i++){if(x%i==0){return false;}}return true;}
void YAY(void){cout<<"YES"<<endl;}
void NAY(void){cout<<"NO"<<endl;}
int n;
int a[1111], b[1111], c[1111], d[1111], e[1111];
int isok[1111];
vector<int> cc;
int main(void)
{
	int i, j, k;
	cin>>n;
	for(i=1 ; i<=n ; i++)
	{
		scanf("%d %d %d %d %d",&a[i],&b[i],&c[i],&d[i],&e[i]);
	}
	if(n>=15)
	{
		printf("%d\n",n);
		for(i=1 ; i<=n ; i++)
		{
			printf("%d\n",i);
		}
		return 0;
	}
	for(i=1 ; i<=n ; i++)
	{
		for(j=1 ; j<=n ; j++)
		{
			for(k=1 ; k<=n ; k++)
			{
				if(i!=j && j!=k && k!=i)
				{
					int xx=(a[j]-a[i])*(a[k]-a[i])+(b[j]-b[i])*(b[k]-b[i])+(c[j]-c[i])*(c[k]-c[i])+(d[j]-d[i])*(d[k]-d[i])+(e[j]-e[i])*(e[k]-e[i]);
					if(xx>0)
					{
						isok[i]=1;
					}
				}
			}
		}
	}
	for(i=1 ; i<=n ; i++)
	{
		if(isok[i]==0)
		{
			cc.push_back(i);
		}
	}
	cout<<cc.size()<<endl;
	for(i=0 ; i<cc.size() ; i++)
	{
		printf("%d\n",cc[i]);
	}
	return 0;
}


#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <stdlib.h>
#include <math.h>
#include <string>
#include <time.h>
#include <string.h>
#include <queue>
#include <stack>
#define sz size()
#define pb push_back
using namespace std;
typedef long long int ll;
ll mod=1e9+7;
ll exp(ll t,ll x){if(x==0) return 1;if(x==1) return t;if(x%2==1) return (t*exp((t*t)%mod,x/2))%mod;if(x%2==0) return exp((t*t)%mod,x/2);}
ll gcd(ll x,ll y){return x%y==0?y:gcd(y,x%y);}
ll lcm(ll x,ll y){return x*(y/gcd(x,y));}
ll bsum(ll u,ll b){return u<b?u:bsum(u/b,b)+u%b;}
ll prival(ll u,ll p){int cn=0;while(u%p==0){cn++;u=u/p;}return cn;}
bool isprime(ll x){for(ll i=2;i*i<=x;i++){if(x%i==0){return false;}}return true;}
void YAY(void){cout<<"YES"<<endl;}
void NAY(void){cout<<"NO"<<endl;}
int n;
int a[1111], b[1111], c[1111], d[1111], e[1111];
int isok[1111];
vector<int> cc;
int main(void)
{
	int i, j, k;
	cin>>n;
	for(i=1 ; i<=n ; i++)
	{
		scanf("%d %d %d %d %d",&a[i],&b[i],&c[i],&d[i],&e[i]);
	}
	if(n>=15)
	{
		printf("%d\n",0);
		return 0;
	}
	for(i=1 ; i<=n ; i++)
	{
		for(j=1 ; j<=n ; j++)
		{
			for(k=1 ; k<=n ; k++)
			{
				if(i!=j && j!=k && k!=i)
				{
					int xx=(a[j]-a[i])*(a[k]-a[i])+(b[j]-b[i])*(b[k]-b[i])+(c[j]-c[i])*(c[k]-c[i])+(d[j]-d[i])*(d[k]-d[i])+(e[j]-e[i])*(e[k]-e[i]);
					if(xx>0)
					{
						isok[i]=1;
					}
				}
			}
		}
	}
	for(i=1 ; i<=n ; i++)
	{
		if(isok[i]==0)
		{
			cc.push_back(i);
		}
	}
	cout<<cc.size()<<endl;
	for(i=0 ; i<cc.size() ; i++)
	{
		printf("%d\n",cc[i]);
	}
	return 0;
}


from math import sqrt, acos, pi

n = int(input())
p = [tuple(map(int, input().split())) for i in range(n)]

def x_y(x, y):
    return x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3] + x[4]*y[4]

def angle(x, y):
    xy = x_y(x, y)

    xx = sqrt(x_y(x, x))
    yy = sqrt(x_y(y, y))

    d = xx * yy
    return pi if d == 0 else acos(xy / d)

good_points = []
for i in range(n):
    a = p[i]
    good = True

    for j in range(n):
        if j == i:
            continue

        b = p[j]

        ab = angle(a, b)
        if ab >= pi:
            continue

        for k in range(n):
            if k == i or k == j:
                continue

            c = p[k]

            ac = angle(a, c)
            if ac < pi:
                good = False
                break

    if good:
        good_points.append(i)

print(len(good_points))
for i in good_points:
    print(i + 1)


n = int(input())
p = [tuple(map(int, input().split())) for i in range(n)]

def d(a, b):
    return tuple(x - y for x, y in zip(a, b))

def m(a, b):
    return sum(x * y for x, y in zip(a, b))

good_points = []
for i in range(n):
    good = True

    for j in range(n):
        if j == i:
            continue

        ab = d(p[j], p[i])

        for k in range(j + 1, n):
            if k == i:
                continue

            ac = d(p[k], p[i])

            if m(ab, ac) > 0:
                good = False
                break

        if not good:
            break

    if good:
        good_points.append(i)

print(len(good_points))
for i in good_points:
    print(i + 1)