#include <bits/stdc++.h>
using namespace std;
long long n, m, t[9], ans[100001], i, rab;
pair<pair<long long, long long>, long long> a[100002];
int main() {
  cin >> n >> m;
  a[0].first.first = 10000000;
  a[m + 1].first.first = 10000000;
  for (i = 1; i <= m; i++) {
    cin >> a[i].first.first >> a[i].first.second;
    a[i].second = i;
  }
  sort(a + 1, a + m + 1);
  for (i = 1; i <= m; i++) {
    if (a[i].first.first == a[i + 1].first.first) ans[a[i].second]++;
    if (a[i].first.first == a[i - 1].first.first) ans[a[i].second]++;
  }
  for (i = 1; i <= m; i++) {
    rab = a[i].first.first;
    a[i].first.first = a[i].first.second;
    a[i].first.second = rab;
  }
  sort(a + 1, a + m + 1);
  for (i = 1; i <= m; i++) {
    if (a[i].first.first == a[i + 1].first.first) ans[a[i].second]++;
    if (a[i].first.first == a[i - 1].first.first) ans[a[i].second]++;
  }
  for (i = 1; i <= m; i++)
    a[i].first.first = a[i].first.first + a[i].first.second;
  sort(a + 1, a + m + 1);
  for (i = 1; i <= m; i++) {
    if (a[i].first.first == a[i + 1].first.first) ans[a[i].second]++;
    if (a[i].first.first == a[i - 1].first.first) ans[a[i].second]++;
  }
  for (i = 1; i <= m; i++)
    a[i].first.first =
        a[i].first.second - (a[i].first.first - a[i].first.second);
  sort(a + 1, a + m + 1);
  for (i = 1; i <= m; i++) {
    if (a[i].first.first == a[i + 1].first.first) ans[a[i].second]++;
    if (a[i].first.first == a[i - 1].first.first) ans[a[i].second]++;
  }
  for (i = 1; i <= m; i++) t[ans[i]]++;
  for (i = 0; i <= 8; i++) cout << t[i] << ' ';
  return 0;
}
