#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a, b;
  cin >> n >> m;
  vector<pair<int, int> > arr(m);
  vector<int> c(m, 0);
  for (int i = 0; i < m; ++i) {
    cin >> a >> b;
    arr[i] = make_pair(a, b);
  }
  sort(arr.begin(), arr.end());
  map<int, bool> mpl, mpt, mptl, mptr, mpr, mpd, mpdl, mpdr;
  for (int i = 0; i < m; ++i) {
    if (mpl[arr[i].first]) c[i]++;
    if (mpt[arr[i].second]) c[i]++;
    if (mptl[arr[i].second - arr[i].first]) c[i]++;
    if (mptr[arr[i].second + arr[i].first]) c[i]++;
    mpl[arr[i].first] = true;
    mpt[arr[i].second] = true;
    mptl[arr[i].second - arr[i].first] = true;
    mptr[arr[i].second + arr[i].first] = true;
  }
  for (int i = m - 1; i >= 0; --i) {
    if (mpr[arr[i].first]) c[i]++;
    if (mpd[arr[i].second]) c[i]++;
    if (mpdr[arr[i].second - arr[i].first]) c[i]++;
    if (mpdl[arr[i].second + arr[i].first]) c[i]++;
    mpr[arr[i].first] = true;
    mpd[arr[i].second] = true;
    mpdr[arr[i].second - arr[i].first] = true;
    mpdl[arr[i].second + arr[i].first] = true;
  }
  vector<int> ans(9, 0);
  for (int i = 0; i < m; ++i) ans[c[i]]++;
  for (int i = 0; i <= 8; ++i) cout << ans[i] << " ";
}
