//* Problem  : A
//* Contest  : NEERC 2007
//* Type     : Solution
//* Date     : 2007.11.29
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 6.0

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

#define MAX(a,b)(a>b?a:b)
#define MIN(a,b)(a<b?a:b)

#define int64 long long

struct point{
	int64 x, y;
	int id;
};

struct segment{
	point p1, p2;
} a[128];

int n;


// checks whether segments k1, k2 have commont point (i.e. intersects)
int inters(int k1, int k2)
{
	int64 xmax1 = MAX(a[k1].p1.x, a[k1].p2.x);
	int64 xmin1 = MIN(a[k1].p1.x, a[k1].p2.x);
	int64 ymax1 = MAX(a[k1].p1.y, a[k1].p2.y);
	int64 ymin1 = MIN(a[k1].p1.y, a[k1].p2.y);
	int64 xmax2 = MAX(a[k2].p1.x, a[k2].p2.x);
	int64 xmin2 = MIN(a[k2].p1.x, a[k2].p2.x);
	int64 ymax2 = MAX(a[k2].p1.y, a[k2].p2.y);
	int64 ymin2 = MIN(a[k2].p1.y, a[k2].p2.y);
	// rectangles dont intersect
	if (xmax1 < xmin2 || xmax2 < xmin1 || ymax1 < ymin2 || ymax2 < ymin1) return 0;
	int64 x1 = a[k1].p1.x;
	int64 y1 = a[k1].p1.y;
	int64 x2 = a[k1].p2.x;
	int64 y2 = a[k1].p2.y;
	int64 x3 = a[k2].p1.x;
	int64 y3 = a[k2].p1.y;
	int64 x4 = a[k2].p2.x;
	int64 y4 = a[k2].p2.y;
	int64 v1 = (x3 - x1) * (y2 - y1) - (x2 - x1) * (y3 - y1);
	int64 v2 = (x4 - x1) * (y2 - y1) - (x2 - x1) * (y4 - y1);
	if (v1 * v2 > 0) return 0;
	v1 = (x1 - x3) * (y4 - y3) - (x4 - x3) * (y1 - y3);
	v2 = (x2 - x3) * (y4 - y3) - (x4 - x3) * (y2 - y3);
	return (v1 * v2 <= 0);
}

void solve()
{
	int f = 1;
	while (f)
	{
		f = 0;
		for (int i = 0; (i < n) && (!f); i++)
			for (int j = i + 1; (j < n) && (!f); j++)
				if (inters(i, j))
				{
					point t = a[i].p2; a[i].p2 = a[j].p2; a[j].p2 = t;
					f = 1;
					break;
				}
	}
}

void result()
{
	for (int i = 0; i < n; i++)
		printf("%d\n", a[i].p2.id);
}

int main()
{
//	freopen("ants.in", "r", stdin);
	scanf("%d", &n);
	int i;
	for (i = 0; i < n; i++)
	{
		scanf("%lld %lld", &a[i].p1.x, &a[i].p1.y);
		a[i].p1.id = i + 1;
	}
	for (i = 0; i < n; i++)
	{
		scanf("%lld %lld", &a[i].p2.x, &a[i].p2.y);
		a[i].p2.id = i + 1;
	}
	solve();
	result();
	return 0;
}

