REGPOLYG - Regular Convex Polygon

no tags 

A regular convex polygon is a polygon where each side has the same length, and all interior angles are equal and less than 180 degrees. A square, for example, is a regular convex polygon. You are given three points which are vertices of a regular convex polygon R; can you determine the minimum number of vertices that R must have?

Input

Each test case consists of three lines. Line i consists of two floating point values xi and yi (−104x1, y1 ≤ 104) where (xi, yi) are the coordinates of a vertex of R. The coordinates are given with a precision of 10−6, i.e., they differ from the exact coordinates by at most 10−6. You may assume that for each test case the Euclidean distance between any two given points is at least 1, and R has at most 1000 vertices. The input will finish with a line containing the word END.

Output

For each test case, print one line with the minimum number of vertices that R must have.

Sample Input

-1385.736326 -146.954822
430.000292 -2041.361203
1162.736034 478.316025
0.000000 4147.000000
-4147.000000 0.000000
0.000000 -4147.000000
END

Sample Output

3
4
Problem setter: Adrian Kuegel


Added by:David García Soriano
Date:2011-11-26
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Southwestern Europe Regional, SWERC 2011