LINES - Game of Lines

题目描述

Farmer John has challenged Bessie to the following game: FJ has a board with dots marked at N (2 ≤ N ≤ 200) distinct lattice points. Dot i has the integer coordinates X $ _{i} $ and Y $ _{i} $ (-1,000 ≤ X $ _{i} $ , Y $ _{i} $ ≤ 1,000). Bessie can score a point in the game by picking two of the dots and drawing a straight line between them; however, she is not allowed to draw a line if she has already drawn another line parallel to it. Bessie would like to know her chances of winning, so she has asked you to help find the maximum score she can obtain.

输入输出格式

输入格式


There will be multiple test cases. For each case, the first line contains the integer N, and each of the next N lines gives a pair of integers, X $ _{i} $ and Y $ _{i} $ . The file ends with the case N = 0, which should not be processed.

输出格式


For each test case, print a single integer representing the maximum number of lines Bessie can draw, no two of which are parallel.

输入输出样例

输入样例 #1

4
-1 1
-2 0
0 0
1 1
0

输出样例 #1

4