atcoder#ABC301G. [ABC301G] Worst Picture
[ABC301G] Worst Picture
Score : points
Problem Statement
There are people in a three-dimensional space. The -th person is at the coordinates . All people are at different coordinates, and we have for every .
You will choose a point such that , and take a photo in the positive -direction.
If the point and the positions of two people are on the same line in the order , then the person at will not be in the photo. There are no other potential obstacles.
Find the number of people in the photo when is chosen to minimize this number.
Constraints
- The triples are distinct.
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
3
1 1 1
2 2 2
100 99 98
2
For instance, if you take the photo from the point , it will not show the second person.
8
1 1 1
1 1 -1
1 -1 1
1 -1 -1
3 2 2
3 2 -2
3 -2 2
3 -2 -2
4
If you take the photo from the point , it will show four people.