Let S be a finite set of at least two points in the plane. Assume that no three points of S are collinear. A windmill is a process that starts with a line l going through a single point P∈S. The line rotates clockwise about the pivot P until the first time that the line meets some other point belonging to S. This point, Q, takes over as the new pivot, and the line now rotates clockwise about Q, until it next meets a point of S. This process continues indefinitely. Show that we can choose a point P in S and a line l going through P such that the resulting windmill uses each point of as a pivot infinitely many times.
Well... This is not your task. Your task is to determine the expected number of steps we need to run to come back to the original state if we choose the pivot point and the first point we meet at random with equal probability.
输入解释
First line, number of test cases, T. Following are T test cases. For each test case, the first line contains one number, n. Each of the following n lines contains two numbers, X-coordinate and Y-coordinate of one point.
T<=10 3<=n<=1000 Absolute value of all coordinates <= 106 No three points are collinear.
输出解释
T lines, each line contains the answer. The answer may be a fraction. In this case, you should output it in the simplest form.