eolymp
bolt
Try our new interface for solving problems
Problems

Cocircular Points

Cocircular Points

You probably know what a set of collinear points is: a set of points such that there exists a straight line that passes through all of them. A set of cocircular points is defined in the same fashion, but instead of a straight line, we ask that there is a circle such that every point of the set lies over its perimeter.

The International Collinear Points Centre (ICPC) has assigned you the following task: given a set of points, calculate the size of the larger subset of cocircular points.

Input

Each test case is given using several lines. The first line contains an integer n (1n100) representing the number of points in the set. Each of the next n lines contains two integers x and y representing the coordinates of a point of the set (−104x, y104). Within each test case, no two points have the same location.

The last test case is followed by a line containing one zero.

Output

For each test case output a single line with a single integer representing the number of points in one of the largest subsets of the input that are cocircular.

Time limit 1 second
Memory limit 122.17 MiB
Input example #1
7
-10 0
0 -10
10 0
0 10
-20 10
-10 20
-2 4
4
-10000 10000
10000 10000
10000 -10000
-10000 -9999
3
-1 0
0 0
1 0
0
Output example #1
5
3
2
Source 2010 ACM South America, Latin America, October 22, Problem C