#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> a(n), b(n), c(m), d(m);
  for (int i = 0; i < (n); i++) {
    cin >> a[i] >> b[i];
  }
  for (int i = 0; i < (m); i++) {
    cin >> c[i] >> d[i];
  }
  vector<int> ans(m);
  for (int i = 0; i < (n); i++) {
    for (int j = 0; j < (m); j++) {
      int mindist = 1 << 30;
      int point = -1;
      int dist = abs(a[i] - c[j]) + abs(b[i] - d[j]);
      if (dist < mindist) {
        mindist = dist;
        point = j;
      }
      ans[point]++;
    }
  }
  for (int i = 0; i < (m); i++) {
    cout << ans[i] << endl;
  }
  return 0;
}
