#include <cstdio>
#include <cmath>
usin namespace std;
int main() {
	int s_x[51], s_y[51], m_x[51], m_y[51], cur_dis;
	int n, m;
	scanf("%d%d", &n, &m);
	for (int i = 0; i < n; i++) scanf("%d%d", &s_x[i], &s_y[i]);
	for (int i = 0; i < m; i++) scanf("%d%d", &m_x[i], &m_y[i]);
	for (int i = 0; i < n; i++) {
		int update_dis = abs(s_x[i] - m_x[0]) + abs(s_y[i] - m_y[0]), checkpoint;
		if (update_dis > cur_dis) {
			for (int j = 1; j < m; j++) {
				cur_dis = abs(s_x[i] - m_x[j]) + abs(s_y[i] - m_y[j]);
				if (update_dis > cur_dis) {
					update_dis = cur_dis;
					checkpoint = j + 1;
				}
			}
			printf("%d\n", checkpoint);
		}
		return 0;
	}
}