#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x, y, c, idx;
  bool operator<(const Point &b) const {
    return (long long)x * b.y - (long long)y * b.x < 0;
  }
};
const int MAXN = 10004;
int n;
Point points[MAXN * 2];
int ans[MAXN];
void init() {
  scanf("%d", &n);
  for (int i = 0, x, y; i < n; i++) {
    scanf("%d %d", &x, &y);
    points[i] = {x, y, -1, i + 1};
  }
  for (int i = 0, x, y; i < n; i++) {
    scanf("%d %d", &x, &y);
    points[i + n] = {x, y, +1, i + 1};
  }
}
template <typename Iter>
void DC(Iter begin, Iter end) {
  if (begin == end) return;
  swap(*begin, *min_element(begin, end, [](const Point &a, const Point &b) {
    return tie(a.x, a.y) < tie(b.x, b.y);
  }));
  Point p = *begin;
  for (Iter it = begin; it != end; it++) {
    it->x -= p.x;
    it->y -= p.y;
  }
  sort(begin + 1, end);
  int m = end - begin;
  int sum = p.c, cnt = 0;
  int bestd = m;
  Iter sep;
  for (Iter it = begin + 1; it != end; it++) {
    sum += it->c;
    cnt++;
    if (sum == 0 && it->c == -begin->c) {
      int d = max(m - 1 - cnt, cnt - 1);
      if (d < bestd) sep = it, bestd = d;
    }
  }
  if (p.c == -1)
    ans[p.idx] = sep->idx;
  else
    ans[sep->idx] = p.idx;
  DC(begin + 1, sep);
  DC(sep + 1, end);
}
int main() {
  init();
  DC(points, points + 2 * n);
  for (int i = 1; i <= n; i++) printf("%d\n", ans[i]);
}
