#include <bits/stdc++.h>
using namespace std;
long long i, j, k, m, fin = 0, n, t, x[100000], y[100000], ans[100000], cnt[9];
pair<pair<long long, long long>, long> p[100000];
void solve() {
  sort(p, p + n);
  for (i = 0; i < n; i++) {
    if (i > 0 && (p[i].first.first == p[i - 1].first.first)) {
      ans[p[i].second]++;
      ans[p[i - 1].second]++;
    }
  }
}
int main() {
  cin >> m >> n;
  for (i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (i = 0; i < n; i++) {
    p[i].second = i;
    p[i].first = pair<long long, long long>(x[i], y[i]);
  }
  solve();
  for (i = 0; i < n; i++) {
    p[i].second = i;
    p[i].first = pair<long long, long long>(y[i], x[i]);
  }
  solve();
  for (i = 0; i < n; i++) {
    p[i].second = i;
    p[i].first = pair<long long, long long>(y[i] - x[i], x[i] + y[i]);
  }
  solve();
  for (i = 0; i < n; i++) {
    p[i].second = i;
    p[i].first = pair<long long, long long>(y[i] + x[i], y[i] - x[i]);
  }
  solve();
  for (i = 0; i < n; i++) cnt[ans[i]]++;
  for (i = 0; i < 9; i++) {
    cout << cnt[i] << " ";
  }
  cout << endl;
  return 0;
}
