Under construction

Still being built. Things may change

Counting Self-Rotating Subsets

Time limit2sMemory limit512 MB

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

Hard8 of 10

Topics
Geometry, Combinatorics
Solved
No attempts yet

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 (1≤N≤10001 \le N \le 1000).

Each of the next NN lines contains two integers XX and YY, the coordinates of one point (−109≤X,Y≤109-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.

Examples4

  1. Example 1

    Input
    3
    1 1
    2 2
    1 0
    
    Expected output
    3 3 0
    
  2. Example 2

    Input
    7
    -2 0
    -1 1
    0 2
    0 0
    2 0
    1 -1
    0 -2
    
    Expected output
    7 21 5 5 3 1 1
    
  3. Example 3

    Input
    1
    -1000000000 1000000000
    
    Expected output
    1
    
  4. Example 4

    Input
    4
    0 0
    1 0
    1 1
    0 1
    
    Expected output
    4 6 0 1