A soccer field is drawn as a grid with r rows and c columns. Every player takes up one grid square, and the o offensive players and the d defensive players all stand on different squares. The offensive players are numbered from 1 in the order they appear in the input, and player 1 has the ball.
A defender can step to a neighboring square to intercept a pass, so one defender guards the square he stands on plus the eight squares that meet it along a side or at a corner, nine squares in all. Squares that fall outside the grid are not counted. Guarded areas of different defenders may overlap.
Player k is open when the segment that joins the center of player 1's square to the center of player k's square touches no guarded square at any point. Grazing a single corner point of a guarded square is enough for the pass to be intercepted. If a defender guards player 1's own square or the receiver's square, an endpoint of the segment already lies inside a guarded square, so that pass is not open. Offensive players never block a pass to another offensive player.
Find every offensive player that player 1 can pass to.
The input holds several test cases.
The first line of each test case holds four integers r, c, o, d separated by spaces: the number of rows, the number of columns, the number of offensive players, and the number of defensive players. (1≤r≤50, 1≤c≤50, 1≤o, 0≤d, o+d≤r×c)
The next o lines each hold the row and the column of one offensive player. Rows and columns are numbered from 0, so a row number is less than r and a column number is less than c. The next d lines hold the defenders in the same format. No two players stand on the same square.
The offensive players are numbered from 1 in the order given, and player 1 has the ball.
A line reading 0 0 0 0 ends the input. That line is not a test case.
For each test case, print Case x: on one line, then the numbers of the offensive players that player 1 can pass to, in increasing order. Put one space in front of each number. x is the test case number counted from 1.
If no player is open, print Case x: with nothing after it.