#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<vector<int>> agent;
  vector<int> a;
  double save1, save2, save3;
  int s, t;
  cin >> s >> t;
  int result[s][2];
  for (int i = 0; i < s; i++) {
    cin >> save1 >> save2;
    a.push_back((int)save1);
    a.push_back((int)save2);
    agent.push_back(a);
    a.clear();
  }
  for (int i = 0; i < t; i++) {
    cin >> save1 >> save2;
    for (int j = 0; j < s; j++) {
      save3 = abs(agent[j][0] - save1) + abs(agent[j][1] - save2);
      if (i == 0) {
        result[j][0] = i;
        result[j][1] = save3;
      } else if (save3 < result[j][1] and i != (t - 1)) {
        result[j][0] = i;
        result[j][1] = save3;
      } else if (save3 < result[j][1] and i == (t - 1)) {
        cout << i << endl;
      } else if (i == (t - 1)) {
        cout << result[j][0] << endl;
      }
    }
  }
}
