#include <bits/stdc++.h>
using namespace std;
void g_dir(vector<vector<pair<long long, long long> > > &graph, long long a,
           long long b, long long w = 1) {
  graph[a].push_back(pair<long long, long long>(b, w));
}
void g_undir(vector<vector<pair<long long, long long> > > &graph, long long a,
             long long b, long long w = 1) {
  g_dir(graph, a, b, w);
  g_dir(graph, b, a, w);
}
template <class T>
void chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
  }
}
template <class T>
void chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
  }
}
const long long INF = 1145141919;
const long long MOD = 1000000007;
const long long NUM = 101010;
long long px[100], py[100];
long long cx[100], cy[100];
long long cost(long long p, long long c) {
  return abs(px[p] - cx[c]) + abs(px[p] - cx[c]);
}
int main() {
  long long N, M;
  cin >> N >> M;
  for (long long(i) = 0; (i) < (N); (i)++) cin >> px[i] >> py[i];
  for (long long(i) = 0; (i) < (M); (i)++) cin >> cx[i] >> cy[i];
  for (long long(i) = 0; (i) < (N); (i)++) {
    long long ans = 0;
    for (long long(j) = 0; (j) < (M); (j)++)
      if (cost(i, ans) > cost(i, j)) ans = j;
    cout << ans + 1 << endl;
  }
  return 0;
}
