#include<iostream>
#include<cmath>

using namespace std;

int x1[100], y1[100], x2[100], y2[100];

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[i] >> y2[i];
int ans, maxim;
mini = 1000000000;
for(int j = 1; j <= N; j++){
int hoge = abs(x1 - x2) + abs(y1 - y2);
if(hoge < mini){
mini = hoge;
ans = j;
}
}
cout << ans << endl;
}
return 0;
}