#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  vector<vector<int>> vecA(N, vector<int>(2));
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < 2; j++) {
      cin >> vecA.at(i).at(j);
    }
  }
  vector<vector<int>> vecB(M, vector<int>(2));
  for (int k = 0; k < N; k++) {
    for (int l = 0; l < 2; l++) {
      cin >> vecB.at(k).at(l);
    }
  }
  for (int m = 0; m < N; m++) {
    long ans = 10000000000;
    int abs_x = 0;
    int ans_x = 0;
    for (int n = 0; n < N; n++) {
      abs_x = abs(vecA.at(m).at(0) - vecB.at(n).at(0)) +
              abs(vecA.at(m).at(1) - vecB.at(n).at(1));
      if (ans > abs_x) {
        ans = abs_x;
        ans_x = n + 1;
      }
    }
    cout << ans_x << endl;
  }
}
