#P5936. [POI 1999 R2] 飞弹
[POI 1999 R2] 飞弹
Background
A war broke out between Country U and Country A.
Problem Description
The chief intelligence officer of Country U learned that Country A has already deployed strong bunkers along the border. The defense system formed by these bunkers will pose a huge threat to U's soldiers. Therefore, before launching an attack, U's Ministry of Defense must destroy these bunkers first.
To achieve a surprise attack, the Ministry of Defense decided that each missile launch site on the border will be responsible for eliminating exactly one bunker.
To catch the enemy off guard, the missile launch sites will fire at the same time. Each missile moves forward at full speed in a straight line, aiming to deliver a devastating strike to the bunker group in a short time.
However, these missiles use ground-to-ground electronic guidance. If the flight paths of two missiles intersect, their electronic signals will interfere with each other, causing them to deviate from their intended targets.
As a military advisor, you need to design an operation plan: decide in advance which bunker each missile launch site will attack, and make sure that under your plan, the missile flight paths do not intersect.
The intelligence department has clearly marked the positions of the missile launch sites and the bunkers on the map, and guarantees that among these points, no three points are collinear.
Input Format
The first line contains an integer , the number of missile launch sites, which is also the number of enemy bunkers.
The next lines each contain two integers and . Line gives the coordinates of the -th missile launch site.
The following lines each contain two integers and . Line gives the coordinates of the -th bunker.
Output Format
Output lines. The -th line contains an integer , meaning that the -th missile launch site is responsible for destroying the -th bunker.
4
0 0
1 5
4 2
2 6
1 2
5 4
4 5
3 1
2
1
4
3
Hint
For of the testdata, .
Translated by ChatGPT 5