Eureka

아직 제출이 없습니다시간 제한5초메모리 제한64 MB

문제

Professor Zhang draws nn points on the plane which are conveniently labeled by 1,2,,n1, 2, \ldots, n. The ii-th point is at (x_i,y_i)(x\_i, y\_i). Professor Zhang wants to know the number of best sets. As the value could be very large, print it modulo 109+710^9 + 7.

A set PP (PP contains the labels of the points) is called a best set if and only if there is at least one best pair in PP. Two numbers uu and vv (u,vP,uv)(u, v \in P, u \ne v) are called a best pair if for every wPw \in P, f(u,v)g(u,v,w)f(u, v) \ge g(u, v, w), where f(u,v)=(x_ux_v)2+(y_uy_v)2f(u, v) = \sqrt{(x\_u - x\_v)^2 + (y\_u - y\_v)^2} and g(u,v,w)=f(u,v)+f(v,w)+f(w,u)2g(u, v, w) = \frac{f(u, v) + f(v, w) + f(w, u)}{2}.

입력

There are multiple test cases. The first line of input contains an integer TT indicating the number of test cases. For each test case:

The first line contains an integer nn (1n1000)(1 \le n \le 1000): the number of points.

Each of the following nn lines contains two integers x_ix\_i and y_iy\_i (109x_i,y_i109)(-10^9 \le x\_i, y\_i \le 10^9): coordinates of the ii-th point.

There are no more than 250250 test cases, and the sum of nn in all the test cases is at most 40,00040\\,000.

출력

For each test case, output a single integer: the number of best sets modulo 109+710^9 + 7.