Darts
Recently, a dart competition took place at LKSH. The target was a circular board with a radius of 10×R, divided into R concentric rings, each with a thickness of 10.
Participants at LKSH threw N darts at this target. Your task is to develop a program that, based on the coordinates where each dart landed, determines which throws missed the target entirely, which ones hit the outermost ring, which hit the next ring, and so on, up to the central circle ((R+1)-th ring).
Input
The first line of the input contains two integers R and N (1 ≤ R ≤ 100, 1 ≤ N ≤ 10^6). This is followed by N lines, each containing two integers representing the coordinates of a dart's landing point, with values not exceeding 1000 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 missed the target. 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).