#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0), EPS = 1e-13;
bool isacute(vector<double> x, vector<double> y) {
  double xy = 0;
  for (int i = 0; i < 5; ++i) {
    xy += x[i] * y[i];
  }
  return xy > EPS;
}
int main() {
  int n;
  cin >> n;
  vector<vector<double> > a(n, vector<double>(5));
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 5; ++j) {
      scanf("%lf", &a[i][j]);
    }
  vector<int> ok(n, 1);
  for (int i = 0; i < n; ++i) {
    if (!ok[i]) continue;
    for (int j = 0; j < n; ++j) {
      if (j == i) continue;
      for (int k = 0; k < j; ++k) {
        if (k == i) continue;
        vector<double> ab(5), ac(5);
        for (int p = 0; p < 5; ++p) {
          ab[p] = a[j][p] - a[i][p];
          ac[p] = a[k][p] - a[i][p];
        }
        if (isacute(ab, ac)) {
          ok[i] = 0;
          j = n;
          break;
        } else {
          ok[j] = 0;
          ok[k] = 0;
        }
      }
    }
  }
  int num = 0;
  for (int i = 0; i < n; ++i) num += ok[i];
  cout << num << endl;
  for (int i = 0; i < n; ++i)
    if (ok[i]) printf("%d\n", i + 1);
  return 0;
}
