#include <bits/stdc++.h>
using namespace std;
struct P {
  int y;
  int 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++) {
    int sx = s[i].x;
    int sy = s[i].y;
    int minD = 0x7FFFFFFF;
    int idx;
    for (int j = (0); j < (int)(m); j++) {
      int cx = c[j].x;
      int cy = c[j].y;
      int d = abs(sx - cx) + abs(sy - cy);
      if (d < minD) {
        idx = j;
        minD = d;
      }
    }
    cout << (idx + 1) << endl;
  }
  return 0;
}
