Points

No attempts yetTime limit1sMemory limit128 MB

Problem

You and your friends invented a game called "Trivial Points", played by placing points in 3D space according to a certain set of rules. To build a computer version of the game, you must write a program that, given a set of points in 3D space, counts how many distinct straight lines pass through at least 3 of the given points.

Input

The first line contains a single integer $n$, the number of points. Each of the next $n$ lines contains three integers $x_i$, $y_i$, $z_i$, separated by single spaces, the coordinates of the $i$-th point.

Output

Print a single integer: the number of distinct lines that pass through at least 3 of the given points.

Constraints

  • $4 \le n \le 1000$
  • $x_i, y_i, z_i$ are integers
  • $-10000 \le x_i, y_i, z_i \le 10000$
  • All given points are distinct.

Hint

In the sample, one line passes through the four collinear points $(-5, -5, -5)$, $(1, 1, 1)$, $(2, 2, 2)$, $(3, 3, 3)$, and another line passes through $(1, 0, -1)$, $(2, 2, 2)$, $(3, 4, 5)$. Both lines contain at least 3 points (the point $(2, 2, 2)$ lies on both), so the answer is $2$.