#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > rows[100010];
vector<pair<int, int> > cols[100010];
vector<pair<int, int> > dR[200010];
vector<pair<int, int> > dL[200010];
int cnt[100010];
pair<int, int> pos[100010];
int ans[9];
int main() {
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int x, y;
    cin >> x >> y;
    rows[x].push_back(make_pair(y, i));
    cols[y].push_back(make_pair(x, i));
    dR[N + x - y].push_back(make_pair(x, i));
    dL[x + y].push_back(make_pair(x, i));
    pos[i] = make_pair(x, y);
  }
  for (int i = 0; i < 100010; i++) {
    cnt[i] = 0;
    sort(rows[i].begin(), rows[i].end());
    sort(cols[i].begin(), cols[i].end());
  }
  for (int i = 0; i < 200010; i++) {
    sort(dR[i].begin(), dR[i].end());
    sort(dL[i].begin(), dL[i].end());
  }
  for (int i = 0; i <= N; i++) {
    for (int j = 0; j < rows[i].size(); j++) {
      int idx = rows[i][j].second;
      if (j != 0) {
        cnt[idx] += 1;
        cnt[rows[i][j - 1].second] += 1;
      }
      int x = pos[idx].first, y = pos[idx].second;
      auto it = lower_bound(cols[y].begin(), cols[y].end(), make_pair(x, idx));
      if (it != cols[y].begin()) {
        cnt[idx] += 1;
        it--;
        cnt[it->second] += 1;
      }
      it = lower_bound(dR[N + x - y].begin(), dR[N + x - y].end(),
                       make_pair(x, idx));
      if (it != dR[N + x - y].begin()) {
        cnt[idx] += 1;
        it--;
        cnt[it->second] += 1;
      }
      it = lower_bound(dL[x + y].begin(), dL[x + y].end(), make_pair(x, idx));
      if (it != dL[x + y].begin()) {
        cnt[idx] += 1;
        it--;
        cnt[it->second] += 1;
      }
    }
  }
  for (int i = 0; i < 9; i++) ans[i] = 0;
  for (int i = 0; i < M; i++) ans[cnt[i]] += 1;
  for (int i = 0; i < 9; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
