#include <bits/stdc++.h>
using namespace std;
struct P {
  long y;
  long x;
};
int main() {
  int n, m;
  cin >> n >> m;
  vector<struct P> s(n);
  for (int i = (0); i < (int)(n); i++) {
    cin >> s[i].x >> s[i].y;
  }
  vector<struct P> c(n);
  for (int i = (0); i < (int)(n); i++) {
    cin >> c[i].x >> c[i].y;
  }
  for (int i = (0); i < (int)(n); i++) {
    long sx = s[i].x;
    long sy = s[i].y;
    long minD = abs(sx - c[0].x) + abs(sy - c[0].y);
    int idx;
    for (int j = (1); j < (int)(m); j++) {
      long cx = c[j].x;
      long cy = c[j].y;
      long d = abs(sx - cx) + abs(sy - cy);
      if (d < minD) {
        idx = j;
        minD = d;
      }
    }
    cout << (idx + 1) << endl;
  }
  return 0;
}
