#include <bits/stdc++.h>
using namespace std;
int r[1000000], c[1000000], y[1000000], tot1[1000000], tot2[1000000],
    tot4[1000000];
pair<int, int> row[1000000], col[1000000], dig2[1000000];
map<int, pair<int, int> > dig1;
map<int, int> tot3;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> r[i] >> c[i];
    if (row[r[i]].first == 0) row[r[i]].first = 2000000000;
    if (col[c[i]].first == 0) col[c[i]].first = 2000000000;
    if (dig1[r[i] - c[i]].first == 0) dig1[r[i] - c[i]].first = 2000000000;
    if (dig2[r[i] + c[i]].first == 0) dig2[r[i] + c[i]].first = 2000000000;
    row[r[i]].first = min(row[r[i]].first, c[i]);
    row[r[i]].second = max(row[r[i]].second, c[i]);
    col[c[i]].first = min(col[c[i]].first, r[i]);
    col[c[i]].second = max(col[c[i]].second, r[i]);
    dig1[r[i] - c[i]].first = min(dig1[r[i] - c[i]].first, r[i]);
    dig1[r[i] - c[i]].second = max(dig1[r[i] - c[i]].second, r[i]);
    dig2[r[i] + c[i]].first = min(dig2[r[i] + c[i]].first, r[i]);
    dig2[r[i] + c[i]].second = max(dig2[r[i] + c[i]].second, r[i]);
    tot1[r[i]]++;
    tot2[c[i]]++;
    tot3[r[i] - c[i]]++;
    tot4[r[i] + c[i]]++;
  }
  for (int i = 0; i < m; i++) {
    if (tot1[r[i]] > 1) {
      if (c[i] != row[r[i]].first && c[i] != row[r[i]].second)
        y[i] += 2;
      else
        y[i]++;
    }
    if (tot2[c[i]] > 1) {
      if (r[i] != col[c[i]].first && r[i] != col[c[i]].second)
        y[i] += 2;
      else
        y[i]++;
    }
    if (tot3[r[i] - c[i]] > 1) {
      if (r[i] != dig1[r[i] - c[i]].first && r[i] != dig1[r[i] - c[i]].second)
        y[i] += 2;
      else
        y[i]++;
    }
    if (tot4[r[i] + c[i]] > 1) {
      if (r[i] != dig2[r[i] + c[i]].first && r[i] != dig2[r[i] + c[i]].second)
        y[i] += 2;
      else
        y[i]++;
    }
  }
  map<int, int> mp;
  for (int i = 0; i < m; i++) mp[y[i]]++;
  for (int i = 0; i <= 8; i++) cout << mp[i] << " ";
  return 0;
}
