#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

int main () {
    ll N,M; cin >> N >> M;
    ll x[N],y[N],a[M],b[M];

    for(int i=0; i<N; i++) {
	cin >> x[i] >> y[i] ;
    }
    for(int i=0; i<M; i++) {
	cin >> a[i] >> b[i];
    }

    for(int i=0; i<M; i++) {
	ll ans = INT_MAX;
	ll ind = 0;
	for(int j=0; j<N; j++) {
	    if( ans <  abs(x[i] - a[j]) + abs(y[i] - b[j]) ) ) {
		ans =  abs(x[i] - a[j]) + abs(y[i] - b[j]) );
		ind = j;
	    }
	}
	cout << ind+1 << endl;
    }
    
    return 0;
}
