#include <bits/stdc++.h>
using namespace std;
struct point {
  int x1, x2, x3, x4, x5;
};
class problem {
 public:
  void idea() {
    input();
    goods();
    output();
  }

 private:
  point *p, a, b, c;
  int num, count, *arr;
  void input() {
    cin >> num;
    p = new point[num + 1];
    arr = new int[num + 1];
    count = num;
    for (int i = 1; i <= num; i++)
      cin >> p[i].x1 >> p[i].x2 >> p[i].x3 >> p[i].x4 >> p[i].x5;
    for (int i = 0; i <= num; i++) arr[i] = 1;
  }
  int goods() {
    if (num > 500) {
      for (int i = 1; i <= num; i++) arr[i] = 0;
      count = 0;
    } else {
      for (int i = 1; i <= num; i++)
        for (int j = 1; j <= num; j++)
          for (int k = 1; k <= num; k++) {
            if (i != j && i != k && j != k) {
              a = p[i];
              b = p[j];
              c = p[k];
              angle(i, j, k);
            }
            if (count == 0) return 0;
          }
    }
    return 0;
  }
  void angle(int i, int j, int k) {
    point ab, ac;
    ab.x1 = b.x1 - a.x1;
    ab.x2 = b.x2 - a.x2;
    ab.x3 = b.x3 - a.x3;
    ab.x4 = b.x4 - a.x4;
    ab.x5 = b.x5 - a.x5;
    ac.x1 = c.x1 - a.x1;
    ac.x2 = c.x2 - a.x2;
    ac.x3 = c.x3 - a.x3;
    ac.x4 = c.x4 - a.x4;
    ac.x5 = c.x5 - a.x5;
    double ang = (cros(ab, ac) / (sqrt(cros(ab, ab)) * sqrt(cros(ac, ac))));
    if (ang > 0 && ang < 90)
      if (arr[i] == 1) {
        arr[i] = 0;
        count--;
      } else if (ang >= 90) {
        if (arr[j] == 1) {
          arr[j] = 0;
          count--;
        }
        if (arr[k] == 1) {
          arr[k] = 0;
          count--;
        }
      }
  }
  double cros(point c1, point c2) {
    return ((c1.x1 * c2.x1) + (c1.x2 * c2.x2) + (c1.x3 * c2.x3) +
            (c1.x4 * c2.x4) + (c1.x5 * c2.x5));
  }
  void output() {
    cout << count << endl;
    for (int i = 1; i <= num; i++)
      if (arr[i] == 1) cout << i << endl;
  }
};
int main() {
  problem test;
  test.idea();
  return 0;
}

### Prompt

Develop a solution in Cpp to the problem described below:

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;
struct point {
  int x1, x2, x3, x4, x5;
};
class problem {
 public:
  void idea() {
    input();
    goods();
    output();
  }

 private:
  point *p, a, b, c;
  int num, count, *arr;
  void input() {
    cin >> num;
    p = new point[num + 1];
    arr = new int[num + 1];
    count = num;
    for (int i = 1; i <= num; i++)
      cin >> p[i].x1 >> p[i].x2 >> p[i].x3 >> p[i].x4 >> p[i].x5;
    for (int i = 0; i <= num; i++) arr[i] = 1;
  }
  int goods() {
    if (num > 500) {
      for (int i = 1; i <= num; i++) arr[i] = 0;
      count = 0;
    } else {
      for (int i = 1; i <= num; i++)
        for (int j = 1; j <= num; j++)
          for (int k = 1; k <= num; k++) {
            if (i != j && i != k && j != k) {
              a = p[i];
              b = p[j];
              c = p[k];
              angle(i, j, k);
            }
            if (count == 0) return 0;
          }
    }
    return 0;
  }
  void angle(int i, int j, int k) {
    point ab, ac;
    ab.x1 = b.x1 - a.x1;
    ab.x2 = b.x2 - a.x2;
    ab.x3 = b.x3 - a.x3;
    ab.x4 = b.x4 - a.x4;
    ab.x5 = b.x5 - a.x5;
    ac.x1 = c.x1 - a.x1;
    ac.x2 = c.x2 - a.x2;
    ac.x3 = c.x3 - a.x3;
    ac.x4 = c.x4 - a.x4;
    ac.x5 = c.x5 - a.x5;
    double ang = (cros(ab, ac) / (sqrt(cros(ab, ab)) * sqrt(cros(ac, ac))));
    if (ang > 0 && ang < 90)
      if (arr[i] == 1) {
        arr[i] = 0;
        count--;
      } else if (ang >= 90) {
        if (arr[j] == 1) {
          arr[j] = 0;
          count--;
        }
        if (arr[k] == 1) {
          arr[k] = 0;
          count--;
        }
      }
  }
  double cros(point c1, point c2) {
    return ((c1.x1 * c2.x1) + (c1.x2 * c2.x2) + (c1.x3 * c2.x3) +
            (c1.x4 * c2.x4) + (c1.x5 * c2.x5));
  }
  void output() {
    cout << count << endl;
    for (int i = 1; i <= num; i++)
      if (arr[i] == 1) cout << i << endl;
  }
};
int main() {
  problem test;
  test.idea();
  return 0;
}

```