#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
const double PI = acos(-1.0);
int n, m, ans[N], t[10];
vector<pair<int, int> > cl[N], ln[N], d[N * 2];
vector<pair<int, int> > sm[N * 2];
int main() {
  cin >> n >> m;
  for (int i = 1, x, y; i <= m; ++i) {
    cin >> x >> y;
    ln[x].push_back({y, i});
    cl[y].push_back({x, i});
    sm[x + y].push_back({x, i});
    d[(n - x + 1) + (y - 1)].push_back({x, i});
  }
  for (int i = 1; i <= n; ++i) {
    sort(ln[i].begin(), ln[i].end());
    sort(cl[i].begin(), cl[i].end());
    for (int j = 0; j < ln[i].size(); ++j) {
      ans[ln[i][j].second] += (j - 1 >= 0) + (j + 1 < ln[i].size());
    }
    for (int j = 0; j < cl[i].size(); ++j) {
      ans[cl[i][j].second] += (j - 1 >= 0) + (j + 1 < cl[i].size());
    }
  }
  for (int i = 1; i <= n * 2; ++i) {
    sort(sm[i].begin(), sm[i].end());
    sort(d[i].begin(), d[i].end());
    for (int j = 0; j < sm[i].size(); ++j) {
      int x, y, z;
      ans[sm[i][j].second] += (j - 1 >= 0) + (j + 1 < sm[i].size());
    }
    for (int j = 0; j < d[i].size(); ++j) {
      ans[d[i][j].second] += (j - 1 >= 0) + (j + 1 < d[i].size());
    }
  }
  for (int i = 1; i <= m; ++i) {
    t[ans[i]]++;
  }
  for (int i = 0; i <= 8; ++i) {
    cout << t[i] << " ";
  }
}
