#include <bits/stdc++.h>
using namespace std;
const double dx = 3.141592653589793238462643383279 / 2;
const int N = 1003;
int n, m, cnt, ans[N], a[N][6];
bool check(int x, int y, int z) {
  int v1[6], v2[6];
  for (int i = 1; i <= 5; i++)
    v1[i] = a[y][i] - a[x][i], v2[i] = a[z][i] - a[x][i];
  int son = 0;
  for (int i = 1; i <= 5; i++) son += v1[i] * v2[i];
  if (son > 0)
    return 1;
  else
    return 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= 5; j++) scanf("%d", &a[i][j]);
  for (int i = 1; i <= n; i++) {
    int yes = 1;
    for (int j = 1; j <= n; j++)
      if (j != i) {
        if (!yes) break;
        for (int k = j + 1; k <= n; k++)
          if (k != i) {
            if (!yes) break;
            if (check(i, j, k)) yes = 0;
          }
      }
    if (yes) ans[++cnt] = i;
  }
  printf("%d\n", cnt);
  for (int i = 1; i <= cnt; i++) printf("%d\n", ans[i]);
}
