#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int n, ans[N];
struct node {
  int x, y, id, op;
} a[N], b[N], now;
bool cmp(node x, node y) {
  return 1ll * (x.y - now.y) * (y.x - now.x) <
         1ll * (y.y - now.y) * (x.x - now.x);
}
void solve(int l, int r) {
  if (l > r) return;
  int mn = 1000000000, t = l, mny = 1000000000;
  for (int i = l; i <= r; i++) {
    if (a[i].x < mn) {
      mn = a[i].x;
      mny = a[i].y;
      t = i;
    } else if (a[i].x == mn) {
      if (a[i].y < mny) {
        mny = a[i].y;
        t = i;
      }
    }
  }
  swap(a[t], a[l]);
  now = a[l];
  sort(a + l + 1, a + r + 1, cmp);
  int sa = 0, sb = 0, pos = 0;
  for (int i = l + 1; i <= r; i++) {
    if (sa == sb && a[i].op != a[l].op) {
      pos = i;
      break;
    }
    sa += (a[i].op == 0);
    sb += (a[i].op == 1);
  }
  if (a[l].op == 0)
    ans[a[l].id] = a[pos].id;
  else
    ans[a[pos].id] = a[l].id;
  solve(l + 1, pos - 1), solve(pos + 1, r);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &a[i].x, &a[i].y);
    a[i].id = i;
    a[i].op = 0;
  }
  for (int i = n + 1; i <= 2 * n; i++) {
    scanf("%d %d", &a[i].x, &a[i].y);
    a[i].id = i - n;
    a[i].op = 1;
  }
  solve(1, 2 * n);
  for (int i = 1; i <= n; i++) printf("%d\n", ans[i]);
  return 0;
}
