#include <bits/stdc++.h>
using namespace std;
long long int x1[100], y1[100], x2, y2;
int main() {
  int N, M;
  cin >> N >> M;
  for (int i = 1; i <= N; i++) {
    cin >> x1[i] >> y1[i];
  }
  for (int i = 0; i < M; i++) {
    cin >> x2 >> y2;
    long long int ans, mini;
    mini = 1000000000LL;
    for (int j = 1; j <= N; j++) {
      long long int hoge = abs(x1[j] - x2) + abs(y1[j] - y2);
      if (hoge < mini) {
        mini = hoge;
        ans = j;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
