Counting Self-Rotating Subsets

For each size i, count the subsets of the given N points that a nontrivial rotation maps onto themselves, modulo 1e9+7.

Hard8GeometryCombinatoricsNo attempts yetTime limit2sMemory limit512 MB

Problem

A set of points in the plane is self-rotating if there is a point PP and an angle α\alpha in degrees with 0<α<3600 < \alpha < 360 such that rotating the plane around PP by α\alpha sends every point of the set to a point that also belongs to the set. The point PP is the center of the rotation.

You are given a set of NN distinct points whose coordinates are integers. For each size 1,2,,N1, 2, \dots, N, count the subsets of that size that are self-rotating. Two subsets are different when one of them contains a point that the other does not contain.

Input

The first line contains one integer NN, the number of points (1N10001 \le N \le 1000).

Each of the next NN lines contains two integers XX and YY, the coordinates of one point (109X,Y109-10^9 \le X, Y \le 10^9). The NN given points are all distinct.

Output

Print one line with NN integers S1,S2,,SNS_1, S_2, \dots, S_N separated by single spaces. SiS_i is the number of self-rotating subsets that contain exactly ii points. These counts can be very large, so print each one modulo 109+710^9 + 7.