#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, n, m;
  cin >> n >> m;
  long long a[n], b[n], c[m], d[m];
  for (i = 0; i < n; i++) cin >> a[i] >> b[i];
  for (i = 0; i < n; i++) cin >> c[i] >> d[i];
  for (i = 0; i < n; i++) {
    long long ret = 1e16;
    long long ans = -1;
    for (j = 0; j < m; i++) {
      if (ret > (abs(a[i] - c[i]) + abs(b[i] - d[i]))) {
        ret = abs(a[i] - c[i]) + abs(b[i] - d[i]);
        ans = j + 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
