MCOCIR - 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 representing the number of points in the set (1 ≤ N ≤ 100). Each of the next N lines contains two integers X and Y representing the coordinates of a point of the set (−104 ≤ X, Y ≤ 104 ). 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.

Sample

Input
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
5
3
2

Added by:psetter
Date:2010-11-04
Time limit:1s-1.419s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:ACM ICPC2010 – Latin American Regional

hide comments
2010-12-21 02:33:45 [Rampage] Blue.Mary
My solution has time complexity O(n^3logn).
2010-12-20 21:49:10 David Gómez
Can O(N^4) get AC?
2010-12-15 21:43:36 Mahesh Chandra Sharma
What is the time limit for C++?
2010-11-08 19:32:58 Shaka Shadows
Problem corrected fellows. :)
2010-11-08 19:26:35 .:: Pratik ::.
Fortune cookie is correct, can this be corrected?
Thanks
2010-11-08 19:26:35 fortune cookie
It seems that the judge input terminates with n=0 or EOF (no zero).
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.