#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U>
ostream& operator<<(ostream& o, const pair<T, U>& p) {
  o << "(" << p.first << "," << p.second << ")";
  return o;
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& v) {
  o << "[";
  for (T t : v) {
    o << t << ",";
  }
  o << "]";
  return o;
}
using pi = pair<int, int>;
using Point = pair<pi, pi>;
int main() {
  int N;
  scanf(" %d", &N);
  vector<Point> pts;
  for (int(i) = 0; (i) < (int)(2); ++(i)) {
    for (int(j) = 0; (j) < (int)(N); ++(j)) {
      int x, y;
      scanf(" %d %d", &x, &y);
      pts.push_back({{x, y}, {i, j}});
    }
  }
  vector<int> ans(N);
  queue<vector<Point>> que;
  que.push(pts);
  while (!que.empty()) {
    vector<Point> p = que.front();
    que.pop();
    int n = p.size();
    sort((p).begin(), (p).end());
    Point b = p[0];
    for (int(i) = 0; (i) < (int)(n); ++(i)) {
      p[i].first.first -= b.first.first;
      p[i].first.second -= b.first.second;
    }
    b = p[0];
    vector<pair<double, int>> args;
    for (int i = 1; i < n; ++i) {
      double rad = atan2(p[i].first.second, p[i].first.first);
      args.push_back({rad, i});
    }
    sort((args).begin(), (args).end());
    Point w;
    int ct = 0;
    for (int(i) = 0; (i) < (int)(n - 1); ++(i)) {
      int idx = args[i].second;
      if (b.second.first == p[idx].second.first)
        ++ct;
      else
        --ct;
      if (ct == -1) {
        w = p[idx];
        break;
      }
    }
    if (b.second.first == 0)
      ans[b.second.second] = w.second.second;
    else
      ans[w.second.second] = b.second.second;
    int A = w.first.second - b.first.second;
    int B = b.first.first - w.first.first;
    int C = b.first.second * w.first.first - b.first.first * w.first.second;
    vector<Point> l, r;
    for (int(i) = 0; (i) < (int)(n); ++(i)) {
      int x = p[i].first.first, y = p[i].first.second;
      int val = A * x + B * y + C;
      if (val > 0)
        l.push_back(p[i]);
      else if (val < 0)
        r.push_back(p[i]);
    }
    if (!l.empty()) que.push(l);
    if (!r.empty()) que.push(r);
  }
  for (int(i) = 0; (i) < (int)(N); ++(i)) printf("%d\n", ans[i] + 1);
  return 0;
}
