#include <bits/stdc++.h>
using namespace std;
void newline() { cout << endl; }
template <typename T>
void display(T input) {
  cout << input;
}
template <typename T>
void put(T input) {
  display(input);
  newline();
}
void iput(int input) { put(input); }
auto main() -> int {
  int n, m;
  cin >> n >> m;
  vector<int> a_i, b_i, c_i, d_i;
  for (int cnt = 0; cnt < n; cnt++) {
    int a, b;
    cin >> a >> b;
    a_i.push_back(a);
    b_i.push_back(b);
  }
  for (int cnt = 0; cnt < m; cnt++) {
    int c, d;
    cin >> c >> d;
    c_i.push_back(c);
    d_i.push_back(d);
  }
  for (int cnt_out = 0; cnt_out < n; cnt_out++) {
    vector<int> distance;
    for (int cnt_in = 0; cnt_in < n; cnt_in++) {
      distance.push_back(abs(a_i[cnt_out] - c_i[cnt_in]) +
                         abs(b_i[cnt_out] - d_i[cnt_in]));
    }
    iput(min_element(distance.begin(), distance.end()) - distance.begin() + 1);
  }
}
