#include <bits/stdc++.h>
using namespace std;
const int Inf = 1e9;
const double EPS = 1e-9;
int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> stu(n);
  vector<pair<int, int>> poi(m);
  int min = 200000000;
  int tmp = min;
  int ans;
  int dis;
  for (int(i) = 0; (i) < (int)(n); i++) {
    int a, b;
    cin >> a >> b;
    stu.at(i) = make_pair(a, b);
  }
  for (int(i) = 0; (i) < (int)(m); i++) {
    int a, b;
    cin >> a >> b;
    poi.at(i) = make_pair(a, b);
  }
  for (int(i) = 0; (i) < (int)(n); i++) {
    for (int(j) = 0; (j) < (int)(m); j++) {
      int a, b, c, d;
      a = stu.at(i).first;
      b = stu.at(i).second;
      c = poi.at(j).first;
      d = poi.at(j).second;
      dis = abs(a - c) + abs(b - d);
      if (dis < min) {
        min = dis;
        ans = j;
      }
      if (j == m - 1) {
        cout << ans + 1 << endl;
        min = tmp;
        ans = tmp;
      }
    }
  }
  return 0;
}
