#include <bits/stdc++.h>
using namespace std;
long long int a[1005][5];
bool acute(long long int i, long long int j, long long int k) {
  long long int x[5], y[5];
  for (long long int d = 0; d < 5; d++) {
    x[d] = a[j][d] - a[i][d];
    y[d] = a[k][d] - a[i][d];
  }
  long long int num = 0;
  for (long long int d = 0; d < 5; d++) num += x[d] * y[d];
  return num > 0;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  for (long long int i = 0; i < n; i++)
    for (long long int j = 0; j < 5; j++) cin >> a[i][j];
  vector<long long int> ans;
  for (long long int i = 0; i < n; i++) {
    bool ok = true;
    for (long long int j = 0; j < n; j++) {
      for (long long int k = 0; k < n; k++) {
        if (i == k || i == j || j == k || j > k) continue;
        if (acute(i, j, k)) {
          ok = false;
          break;
        }
      }
      if (!ok) break;
    }
    if (ok) ans.push_back(i);
  }
  cout << ans.size() << '\n';
  for (auto i : ans) cout << i + 1 << '\n';
}
