#include <bits/stdc++.h>
using namespace std;
long mm(long sx, long sy, long px, long py) {
  long len = abs(sx - px) + abs(sy - py);
  return len;
}
struct P {
  long x;
  long y;
};
int main() {
  int n, m;
  cin >> n >> m;
  vector<struct P> s(n);
  for (int i = (0); i < (int)(n); i++) {
    long a, b;
    cin >> a >> b;
    s[i].x = a;
    s[i].y = b;
  }
  vector<struct P> p(m);
  for (int i = (0); i < (int)(m); i++) {
    long a, b;
    cin >> a >> b;
    p[i].x = a;
    p[i].y = b;
  }
  for (int i = (0); i < (int)(n); i++) {
    long min_l = 0xFFFFFFFF;
    int min_j;
    for (int j = (0); j < (int)(n); j++) {
      long M = mm(s[i].x, s[i].y, p[j].x, p[j].y);
      if (M < min_l) {
        min_l = M;
        min_j = j;
      }
    }
    cout << (min_j + 1) << endl;
  }
  return 0;
}
