Darts#5200

Darts

1 second
64 megabytes
Hard

Recently, a dart competition took place at LKSH. The target was a circular board with a radius of 10 \times R, divided into concentric rings, each with a thickness of .

Participants at LKSH threw darts at this target. Your task is to develop a program that, based on the coordinates where each dart landed, determines which throws went into the milk (missed the target), which ones hit the outermost ring, which hit the next ring, and so on, up to the central circle (the (R+1)-th ring).

Input

The first line of the input contains two integers and (1 \leq R \leq 100, 1 \leq N \leq 10^6). This is followed by lines, each containing two integers representing the coordinates of a dart's landing point, with values not exceeding in absolute value. The center of the target is at the origin of the coordinate system.

Output

The output should consist of R + 1 lines. The first line should list the indices of the throws that went into the milk. The second line should list the indices of the throws that hit the outermost ring. The third line should list the indices of the throws that hit the second ring, and so on. The (R + 1)-th line should list the indices of the throws that hit the central circle. If a throw lands exactly on the boundary between two rings, it is considered to have hit the ring closer to the center.

Note: If no throws hit a particular ring, the corresponding line should be left empty (as shown in the first example).

Examples

Example 1

Loading
Loading