#include <bits/stdc++.h>
using namespace std;
int Ans[1001], A[1001], B[1001], C[1001], D[1001], E[1001];
int value(int Arr[], int i, int j, int k) {
  return (Arr[j] - Arr[i]) * (Arr[k] - Arr[i]);
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i] >> B[i] >> C[i] >> D[i] >> E[i];
  }
  int index = 0;
  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) {
            if ((value(A, i, j, k) + value(B, i, j, k) + value(C, i, j, k) +
                 value(D, i, j, k) + value(E, i, j, k)) > 0) {
              Ans[i] = -1;
              break;
            }
          }
        }
      }
    }
  }
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (Ans[i] != -1) {
      count++;
    }
  }
  cout << count << endl;
  for (int i = 0; i < n; i++) {
    if (Ans[i] != -1) {
      cout << i + 1 << endl;
      count++;
    }
  }
  return 0;
}
