#include <bits/stdc++.h>
using namespace std;
struct pt {
  int x, y, id, tag;
} a[50050];
int n, ans[50050];
inline bool cmp1(const pt &a, const pt &b) {
  return a.y == b.y ? a.x < b.x : a.y < b.y;
}
inline int cal(pt a, pt b) {}
inline bool cmp2(const pt &a, const pt &b) {
  return 1ll * a.x * b.y - 1ll * a.y * b.x < 0;
}
inline void solve(int l, int r) {
  if (l > r) return;
  nth_element(a + l, a + l, a + r + 1, cmp1);
  for (int i = r; i >= l; --i) a[i].x -= a[l].x, a[i].y -= a[l].y;
  sort(a + l + 1, a + r + 1, cmp2);
  for (int i = l + 1, s1 = 0, s2 = 0; i <= r; ++i) {
    if (s1 == s2 && a[i].tag != a[l].tag) {
      if (!a[i].tag)
        ans[a[i].id] = a[l].id;
      else
        ans[a[l].id] = a[i].id;
      solve(l + 1, i - 1);
      solve(i + 1, r);
      return;
    }
    a[i].tag ? ++s1 : ++s2;
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) scanf("%d%d", &a[i].x, &a[i].y), a[i].id = i;
  for (int i = 1; i <= n; ++i)
    scanf("%d%d", &a[i + n].x, &a[i + n].y), a[i + n].id = i, a[i + n].tag = 1;
  solve(1, n + n);
  for (int i = 1; i <= n; ++i) printf("%d\n", ans[i]);
  return 0;
}
