#include <bits/stdc++.h>
using namespace std;
void ga(int N, int *A) {
  for (int i(0); i < N; i++) scanf("%d", A + i);
}
map<int, vector<pair<int, int> > > T[4];
int N, M, a, b, f[10], C[100005];
int main(void) {
  scanf("%d%d", &N, &M);
  for (int i(0); i < M; i++)
    scanf("%d%d", &a, &b), T[0][a].push_back({b, i}), T[1][b].push_back({a, i}),
        T[2][a + b].push_back({a, i}), T[3][a - b].push_back({a, i});
  for (int i(0); i < 4; i++)
    for (auto &h : T[i]) {
      sort(h.second.begin(), h.second.end());
      a = 0;
      for (auto &w : h.second) C[w.second] += a, a = 1;
      reverse(h.second.begin(), h.second.end());
      a = 0;
      for (auto &w : h.second) C[w.second] += a, a = 1;
    }
  for (int i(0); i < M; i++) ++f[C[i]];
  for (int i(0); i < 9; i++) printf("%d ", f[i]);
  puts("");
  return 0;
}
