#include <bits/stdc++.h>
using namespace std;
int dist(tuple<int, int, int> tps, tuple<int, int, int> tpc) {
  int x1 = get<1>(tps);
  int x2 = get<1>(tpc);
  int y1 = get<2>(tps);
  int y2 = get<2>(tpc);
  return abs(x1 - x2) + abs(y1 - y2);
}
int f(tuple<int, int, int> tps, vector<tuple<int, int, int>> tpc) {
  int tmp = 100000000;
  int n = tpc.size();
  int res;
  for (int(i) = 0; i < (n); ++(i)) {
    int t = dist(tps, tpc[i]);
    if (tmp > t) {
      tmp = t;
      res = get<0>(tpc[i]);
    }
  }
  return res;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<tuple<int, int, int>> tps(n);
  vector<tuple<int, int, int>> tpc(m);
  for (int(i) = 0; i < (n); ++(i)) {
    int a, b;
    cin >> a >> b;
    tps[i] = make_tuple(i + 1, a, b);
  }
  for (int(i) = 0; i < (m); ++(i)) {
    int c, d;
    cin >> c >> d;
    tpc[i] = make_tuple(i + 1, c, d);
  }
  for (int(i) = 0; i < (n); ++(i)) {
    cout << f(tps[i], tpc) << endl;
    ;
  }
  return 0;
}
