#include <bits/stdc++.h>
using namespace std;
inline void read(int &num)
{
char ch; num = 0; int flag = 1;
while((ch=getchar()) < '0' || ch > '9')if(ch == '-') flag = -flag;
while(ch >= '0' && ch <= '9') num = num*10 + ch-'0', ch = getchar();
num *= flag;
}
const int MAXN = 105;
int n, p[MAXN][2];
int pre[MAXN], cy[MAXN];
double slk[MAXN],dbx[MAXN], dby[MAXN], w[MAXN][MAXN];
bool vis[MAXN];
void bfs(int now)
{
memset(vis, 0, sizeof vis);
memset(slk, 127, sizeof slk);
int x, y = 0, Minloc; cy[y] = now;
do {
x = cy[y]; Minloc = 0; vis[y] = 1;
for(int i = 1; i <= n; i++) if(!vis[i])
{
if(dbx[x]+dby[i]-w[x][i] < slk[i]) slk[i] = dbx[x]+dby[i]-w[x][i], pre[i] = y;
if(slk[i] < slk[Minloc]) Minloc = i;
}
double inc = slk[Minloc]; //注意不要定义成int
for(int i = 0; i <= n; i++)
if(vis[i]) dbx[cy[i]] -= inc, dby[i] += inc;
else slk[i] -= inc;
y = Minloc;
}while(~cy[y]);
while(y) cy[y] = cy[pre[y]], y = pre[y];
}
void KM()
{
memset(cy, -1, sizeof cy);
for(int i = 1; i <= n; i++) bfs(i);
for(int i = 1; i <= n; i++) printf("%d
", cy[i]);
}
inline double dist(int a1, int b1, int a2, int b2)
{
return sqrt(1.0*(a1-a2)*(a1-a2) + (b1-b2)*(b1-b2));
}
int main ()
{
while(scanf("%d", &n) != EOF)
{
for(int i = 1; i <= n; i++) read(p[i][0]), read(p[i][1]);
for(int i = 1, x, y; i <= n; i++)
{
read(x), read(y);
for(int j = 1; j <= n; j++)
w[i][j] = -dist(x, y, p[j][0], p[j][1]);
}
KM();
}
}