#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
int main() {
  int n, m;
  std::cin >> n >> m;
  std::vector<P> s;
  std::vector<P> c;
  for (int i = 0; i < (n); ++i) {
    int t1, t2;
    std::cin >> t1 >> t2;
    s.push_back(P(t1, t2));
  }
  for (int i = 0; i < (m); ++i) {
    int t1, t2;
    std::cin >> t1 >> t2;
    c.push_back(P(t1, t2));
  }
  for (int i = 0; i < (n); ++i) {
    ll cost = 100100100100100;
    int p = 0;
    ll nx = s[i].first;
    ll ny = s[i].second;
    for (int j = 0; j < (n); ++j) {
      ll now = abs(nx - c[j].first) + abs(ny - c[j].second);
      if (cost > now) {
        cost = now;
        p = j + 1;
      }
    }
    std::cout << p << '\n';
  }
  return 0;
}
