#include <bits/stdc++.h>
using namespace std;
const int N = 2e4 + 7;
inline int read() {
  int x = 0;
  bool f = 0;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) f = (ch == '-');
  for (; isdigit(ch); ch = getchar()) x = (x << 3) + (x << 1) + (ch ^ 48);
  return f ? -x : x;
}
int n, ans[N];
struct node {
  int x, y;
  node() {}
  node(int a, int b) {
    x = a;
    y = b;
  }
  inline node friend operator-(node &a, node &b) {
    return node(a.x - b.x, a.y - b.y);
  }
};
struct Node {
  node p;
  int c, id;
  double sb;
} a[N];
inline bool cmp1(const node &a, const node &b) {
  return a.x == b.x ? a.y < b.y : a.x < b.x;
}
inline bool Cmp2(const Node &a, const Node &b) { return a.sb < b.sb; }
void solve(int l, int r) {
  if (l > r) return;
  for (int i = l + 1; i <= r; ++i)
    if (cmp1(a[i].p, a[l].p)) swap(a[l], a[i]);
  for (int i = l + 1; i <= r; ++i)
    a[i].sb = atan2(a[i].p.y - a[l].p.y, a[i].p.x - a[l].p.x);
  sort(a + l + 1, a + r + 1, Cmp2);
  int pos = -1, sum = 1, mid = (l + r) >> 1;
  for (int i = l + 1; i <= r; ++i) {
    sum += (a[i].c == a[l].c ? 1 : -1);
    if (!sum && a[i].c != a[l].c) pos = i;
  }
  if (pos <= l || pos > r) puts("sb?");
  if (a[l].c)
    ans[a[pos].id] = a[l].id;
  else
    ans[a[l].id] = a[pos].id;
  solve(l + 1, pos - 1);
  solve(pos + 1, r);
}
int main() {
  n = read();
  for (int i = 1; i <= n; ++i)
    a[i].p.x = read(), a[i].p.y = read(), a[i].id = i;
  for (int i = n + 1; i <= n + n; ++i)
    a[i].p.x = read(), a[i].p.y = read(), a[i].id = i - n, a[i].c = 1;
  solve(1, 2 * n);
  for (int i = 1; i <= n; ++i) printf("%d\n", ans[i]);
  return 0;
}
