A mysterious explosive device resembling a bomb has been planted inside of an abandoned village by an unknown perpetrator.
The village has
There are
Here is an example with the starting point of the bomb represented by a red diamond, and the walls that are about to be destroyed highlighted in red:




Each point, including the bomb, is located at some distinct integer location
You are tasked with identifying the collateral damage inflicted upon the village by outputting the walls that were destroyed.
Constraints
Each point is an endpoint of at least one wall, and no two points are the same.
The bomb will not be directly located on any other point or wall.
Subtask 1 [50%]
Subtask 2 [50%]
No additional constraints.
Input Specification
The first line of input contains integers
The next
The next
The next line of input contains another set of integers
Output Specification
Output the indices of the walls that were destroyed in any order (one wall per line).
Sample Input 1
27 29
5 1
8 1
9 1
2 2
5 2
8 2
9 2
3 3
5 3
7 3
4 4
5 4
3 6
5 6
7 6
2 7
5 7
1 8
2 8
5 8
7 8
9 8
1 9
2 9
3 9
5 9
7 9
2 1
2 3
5 1
4 5
2 6
6 7
7 3
4 16
16 17
17 20
20 21
21 22
21 27
22 7
5 9
9 8
13 8
14 13
14 12
12 11
14 15
15 10
10 9
18 19
18 23
23 24
24 19
26 25
14 17
4 5
Sample Output 1
1
3
4
5
6
8
9
10
11
12
14
16
17
18
21
22
23
Explanation for Sample 1
This sample corresponds to the figure above.
Sample Input 2
8 8
0 0
6 0
6 8
0 8
2 2
2 4
4 4
4 2
1 2
2 3
3 4
4 1
5 6
6 7
7 8
8 5
3 6
Sample Output 2
4
3
2
1
Comments