Matches#5460

Matches

2 seconds
64 megabytes
Very hard

Matches are not toys for children!

Fire Safety Briefing

In the game "Fort Boyard," scouts may face the following challenge: there are matches on the table, and you need to remove exactly of them so that the remaining configuration forms exactly squares.

Input

The first line of input contains the integers , , and (0 < k < n < 25, 0 \le m \le 50). Each of the next lines contains a description of a match: four integers x_{i,1}, y_{i,1}, x_{i,2}, y_{i,2}, representing the coordinates of the endpoints of the -th match.

Each match has length . No two matches overlap. The absolute values of all coordinates do not exceed .

Output

If it is impossible to obtain exactly squares, output the single number . Otherwise, output numbers: the indices of the matches to remove. Matches are numbered starting from . If there are multiple solutions, output any one of them.

Examples

Example 1

Loading
Loading