#include <bits/stdc++.h>
int main(void) {
  int a[100], b[100], c[100], d[100], tmp, check, n, m, i, j, point;
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) scanf("%d %d", &a[i], &b[i]);
  for (j = 0; j < m; j++) scanf("%d %d", &c[j], &d[j]);
  for (i = 0; i < n; i++) {
    tmp = 500000000;
    point = 0;
    for (j = 0; j < m; j++) {
      check = abs(a[i] - c[j]) + abs(b[i] - d[j]);
      if (check < tmp) {
        tmp = check;
        point = point + 1;
      }
    }
    printf("%d\n", point);
  }
}
