#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
vector<int> row[N];
vector<int> col[N];
vector<pair<int, int> > ld[N * 2];
vector<pair<int, int> > rd[N * 2];
map<pair<int, int>, int> mp;
int a[10];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  int x, y;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    row[x].push_back(y);
    col[y].push_back(x);
    ld[x - y + n].push_back(pair<int, int>(x, y));
    rd[x + y].push_back(pair<int, int>(x, y));
  }
  for (int i = 0; i < n + 10; i++) {
    sort(row[i].begin(), row[i].end());
    sort(col[i].begin(), col[i].end());
  }
  for (int i = 0; i < 2 * n + 10; i++) {
    sort(ld[i].begin(), ld[i].end());
    sort(rd[i].begin(), rd[i].end());
  }
  for (int i = 1; i <= n; i++) {
    if (row[i].size() == 0 || row[i].size() == 1) continue;
    for (int j = 0; j < row[i].size(); j++) {
      if (!j || j == row[i].size() - 1)
        mp[pair<int, int>(i, row[i][j])]++;
      else
        mp[pair<int, int>(i, row[i][j])] += 2;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (col[i].size() == 0 || col[i].size() == 1) continue;
    for (int j = 0; j < col[i].size(); j++) {
      if (!j || j == col[i].size() - 1)
        mp[pair<int, int>(col[i][j], i)]++;
      else
        mp[pair<int, int>(col[i][j], i)] += 2;
    }
  }
  for (int i = 0; i <= n * 2; i++) {
    if (ld[i].size() == 0 || ld[i].size() == 1) continue;
    for (int j = 0; j < ld[i].size(); j++) {
      if (!j || j == ld[i].size() - 1)
        mp[ld[i][j]]++;
      else
        mp[ld[i][j]] += 2;
    }
  }
  for (int i = 0; i <= n * 2; i++) {
    if (rd[i].size() == 0 || rd[i].size() == 1) continue;
    for (int j = 0; j < rd[i].size(); j++) {
      if (!j || j == rd[i].size() - 1)
        mp[rd[i][j]]++;
      else
        mp[rd[i][j]] += 2;
    }
  }
  int counter = 0;
  for (auto x : mp) {
    counter++;
    a[x.second]++;
  }
  a[0] = m - counter;
  for (int i = 0; i <= 8; i++) cout << a[i] << ' ';
  cout << endl;
  return 0;
}
