#include <bits/stdc++.h>
using namespace std;
const long double PI = atan(1.0) * 4.0;
const long long int M = 1e9 + 7;
const int INF = 1e7;
const long double EPS = 0.0000001;
int n;
long double a[1005], b[1005], c[1005], d[1005], e[1005];
bool fun(int x, int y, int z) {
  long double num =
      (a[y] - a[x]) * (a[z] - a[x]) + (b[y] - b[x]) * (b[z] - b[x]) +
      (c[y] - c[x]) * (c[z] - c[x]) + (d[y] - d[x]) * (d[z] - d[x]) +
      (e[y] - e[x]) * (e[z] - e[x]);
  long double den1 =
      sqrtl((a[y] - a[x]) * (a[y] - a[x]) + (b[y] - b[x]) * (b[y] - b[x]) +
            (c[y] - c[x]) * (c[y] - c[x]) + (d[y] - d[x]) * (d[y] - d[x]) +
            (e[y] - e[x]) * (e[y] - e[x]));
  long double den2 =
      sqrtl((a[z] - a[x]) * (a[z] - a[x]) + (b[z] - b[x]) * (b[z] - b[x]) +
            (c[z] - c[x]) * (c[z] - c[x]) + (d[z] - d[x]) * (d[z] - d[x]) +
            (e[z] - e[x]) * (e[z] - e[x]));
  den1 *= den2;
  return num * den1 > 0;
}
bool isbad(int x) {
  for (int i = 0; i <= n - 1; i++) {
    if (i == x) continue;
    for (int j = i + 1; j <= n - 1; j++) {
      if (j == x) continue;
      if (fun(x, i, j) == 1) {
        return 1;
      }
    }
  }
  return 0;
}
void solve() {
  cin >> n;
  if (n > 11) {
    cout << 0 << endl;
    return;
  }
  vector<int> good[2];
  for (int i = 0; i <= n - 1; i++) {
    cin >> a[i] >> b[i] >> c[i] >> d[i] >> e[i];
    good[0].push_back(i);
  }
  int x = 0;
  while (good[x].size() >= 3) {
    int nn = good[x].size();
    good[1 - x].clear();
    for (int i = 0; i < nn; i += 3) {
      if (i + 2 >= nn) {
        for (int j = i; j <= nn - 1; j++) good[1 - x].push_back(good[x][j]);
      } else {
        if (fun(good[x][i], good[x][i + 1], good[x][i + 2]) == 0)
          good[1 - x].push_back(good[x][i]);
        if (fun(good[x][i + 1], good[x][i], good[x][i + 2]) == 0)
          good[1 - x].push_back(good[x][i + 1]);
        if (fun(good[x][i + 2], good[x][i + 1], good[x][i]) == 0)
          good[1 - x].push_back(good[x][i + 2]);
      }
    }
    x = 1 - x;
  }
  int cnt = 0;
  vector<int> ans;
  for (int i = 1; i <= good[x].size(); i++) {
    if (isbad(good[x][i - 1]) == 1)
      continue;
    else {
      cnt++;
      ans.push_back(good[x][i - 1] + 1);
    }
  }
  cout << cnt << endl;
  for (auto xx : ans) cout << xx << endl;
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int T = 1;
  for (int tt = 0; tt <= T - 1; tt++) {
    solve();
  }
  return 0;
}

### Prompt

In Cpp, your task is to solve the following problem:

You are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two points coincide.

We will call point a bad if there are different points b and c, not equal to a, from the given set such that angle between vectors <image> and <image> is acute (i.e. strictly less than <image>). Otherwise, the point is called good.

The angle between vectors <image> and <image> in 5-dimensional space is defined as <image>, where <image> is the scalar product and <image> is length of <image>.

Given the list of points, print the indices of the good points in ascending order.

Input

The first line of input contains a single integer n (1 ≤ n ≤ 103) — the number of points.

The next n lines of input contain five integers ai, bi, ci, di, ei (|ai|, |bi|, |ci|, |di|, |ei| ≤ 103) — the coordinates of the i-th point. All points are distinct.

Output

First, print a single integer k — the number of good points.

Then, print k integers, each on their own line — the indices of the good points in ascending order.

Examples

Input

6
0 0 0 0 0
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1


Output

1
1


Input

3
0 0 1 2 0
0 0 9 2 0
0 0 5 9 0


Output

0

Note

In the first sample, the first point forms exactly a <image> angle with all other pairs of points, so it is good.

In the second sample, along the cd plane, we can see the points look as follows:

<image>

We can see that all angles here are acute, so no points are good.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long double PI = atan(1.0) * 4.0;
const long long int M = 1e9 + 7;
const int INF = 1e7;
const long double EPS = 0.0000001;
int n;
long double a[1005], b[1005], c[1005], d[1005], e[1005];
bool fun(int x, int y, int z) {
  long double num =
      (a[y] - a[x]) * (a[z] - a[x]) + (b[y] - b[x]) * (b[z] - b[x]) +
      (c[y] - c[x]) * (c[z] - c[x]) + (d[y] - d[x]) * (d[z] - d[x]) +
      (e[y] - e[x]) * (e[z] - e[x]);
  long double den1 =
      sqrtl((a[y] - a[x]) * (a[y] - a[x]) + (b[y] - b[x]) * (b[y] - b[x]) +
            (c[y] - c[x]) * (c[y] - c[x]) + (d[y] - d[x]) * (d[y] - d[x]) +
            (e[y] - e[x]) * (e[y] - e[x]));
  long double den2 =
      sqrtl((a[z] - a[x]) * (a[z] - a[x]) + (b[z] - b[x]) * (b[z] - b[x]) +
            (c[z] - c[x]) * (c[z] - c[x]) + (d[z] - d[x]) * (d[z] - d[x]) +
            (e[z] - e[x]) * (e[z] - e[x]));
  den1 *= den2;
  return num * den1 > 0;
}
bool isbad(int x) {
  for (int i = 0; i <= n - 1; i++) {
    if (i == x) continue;
    for (int j = i + 1; j <= n - 1; j++) {
      if (j == x) continue;
      if (fun(x, i, j) == 1) {
        return 1;
      }
    }
  }
  return 0;
}
void solve() {
  cin >> n;
  if (n > 11) {
    cout << 0 << endl;
    return;
  }
  vector<int> good[2];
  for (int i = 0; i <= n - 1; i++) {
    cin >> a[i] >> b[i] >> c[i] >> d[i] >> e[i];
    good[0].push_back(i);
  }
  int x = 0;
  while (good[x].size() >= 3) {
    int nn = good[x].size();
    good[1 - x].clear();
    for (int i = 0; i < nn; i += 3) {
      if (i + 2 >= nn) {
        for (int j = i; j <= nn - 1; j++) good[1 - x].push_back(good[x][j]);
      } else {
        if (fun(good[x][i], good[x][i + 1], good[x][i + 2]) == 0)
          good[1 - x].push_back(good[x][i]);
        if (fun(good[x][i + 1], good[x][i], good[x][i + 2]) == 0)
          good[1 - x].push_back(good[x][i + 1]);
        if (fun(good[x][i + 2], good[x][i + 1], good[x][i]) == 0)
          good[1 - x].push_back(good[x][i + 2]);
      }
    }
    x = 1 - x;
  }
  int cnt = 0;
  vector<int> ans;
  for (int i = 1; i <= good[x].size(); i++) {
    if (isbad(good[x][i - 1]) == 1)
      continue;
    else {
      cnt++;
      ans.push_back(good[x][i - 1] + 1);
    }
  }
  cout << cnt << endl;
  for (auto xx : ans) cout << xx << endl;
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int T = 1;
  for (int tt = 0; tt <= T - 1; tt++) {
    solve();
  }
  return 0;
}

```