#include <bits/stdc++.h>
using namespace std;
int dist(pair<int, int> a, pair<int, int> b) {
  return abs(a.first - b.first) + abs(a.second - b.second);
}
int main() {
  vector<pair<int, int> > na(100), ma(100);
  int n, m;
  cin >> n >> m;
  for (int(i) = (0); (i) < (int)(n); ++(i)) {
    int a, b;
    cin >> a >> b;
    na[i] = pair<int, int>(a, b);
  }
  for (int(i) = (0); (i) < (int)(m); ++(i)) {
    int a, b;
    cin >> a >> b;
    ma[i] = pair<int, int>(a, b);
  }
  for (int(i) = (0); (i) < (int)(n); ++(i)) {
    pair<int, int> a = na[i];
    long long mi = 1e10;
    int ans = -1;
    for (int(j) = (0); (j) < (int)(n); ++(j)) {
      pair<int, int> b = ma[j];
      if (mi > dist(a, b)) {
        mi = dist(a, b);
        ans = j;
      }
    }
    cout << ans + 1 << endl;
  }
}
