#include <bits/stdc++.h>
using namespace std;
vector<int> X[200100], Y[200100], jog[200100], biog[200100];
int ans[10];
int all[100005][2];
int func(vector<int> &v, int val) {
  int ret = 0;
  vector<int>::iterator it = lower_bound(v.begin(), v.end(), val);
  if (it != v.begin()) ret++;
  if (it + 1 != v.end()) ret++;
  return ret;
}
int main() {
  int n, m, i;
  scanf("%d", &n);
  scanf("%d", &m);
  for (i = 0; i < m; i++) {
    int x, y;
    scanf("%d", &x);
    scanf("%d", &y);
    all[i][0] = x;
    all[i][1] = y;
    X[x].push_back(y);
    Y[y].push_back(x);
    jog[x + y].push_back(x);
    biog[x - y + 100005].push_back(x);
  }
  for (i = 0; i < 200100; i++) {
    sort(X[i].begin(), X[i].end());
    sort(Y[i].begin(), Y[i].end());
    sort(jog[i].begin(), jog[i].end());
    sort(biog[i].begin(), biog[i].end());
  }
  for (i = 0; i < m; i++) {
    int tot = 0, x = all[i][0], y = all[i][1];
    tot += func(X[x], y);
    tot += func(Y[y], x);
    tot += func(jog[x + y], x);
    tot += func(biog[x - y + 100005], x);
    ans[tot]++;
  }
  for (i = 0; i < 9; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
