#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[110000];
pair<int, pair<int, int> > b[110000];
int cnt[110000];
bool z[210000];
int main() {
  int n;
  scanf("%d", &n);
  int m;
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &a[i].first, &a[i].second);
  }
  for (int i = 0; i < m; i++) {
    cnt[i] = 0;
    b[i].first = a[i].first;
    b[i].second = make_pair(a[i].second, i);
  }
  sort(b, b + m);
  for (int i = 1; i <= n; i++) z[i] = false;
  for (int i = 0; i < m; i++) {
    if (z[b[i].first]) cnt[b[i].second.second]++;
    z[b[i].first] = true;
  }
  reverse(b, b + m);
  for (int i = 1; i <= n; i++) z[i] = false;
  for (int i = 0; i < m; i++) {
    if (z[b[i].first]) cnt[b[i].second.second]++;
    z[b[i].first] = true;
  }
  for (int i = 0; i < m; i++) {
    b[i].first = a[i].second;
    b[i].second = make_pair(a[i].first, i);
  }
  sort(b, b + m);
  for (int i = 1; i <= n; i++) z[i] = false;
  for (int i = 0; i < m; i++) {
    if (z[b[i].first]) cnt[b[i].second.second]++;
    z[b[i].first] = true;
  }
  reverse(b, b + m);
  for (int i = 1; i <= n; i++) z[i] = false;
  for (int i = 0; i < m; i++) {
    if (z[b[i].first]) cnt[b[i].second.second]++;
    z[b[i].first] = true;
  }
  for (int i = 0; i < m; i++) {
    b[i].first = a[i].first - a[i].second;
    b[i].second = make_pair(a[i].first, i);
  }
  sort(b, b + m);
  for (int i = 0; i < 2 * n; i++) z[i] = false;
  for (int i = 0; i < m; i++) {
    if (z[b[i].first + n]) cnt[b[i].second.second]++;
    z[b[i].first + n] = true;
  }
  reverse(b, b + m);
  for (int i = 0; i < 2 * n; i++) z[i] = false;
  for (int i = 0; i < m; i++) {
    if (z[b[i].first + n]) cnt[b[i].second.second]++;
    z[b[i].first + n] = true;
  }
  for (int i = 0; i < m; i++) {
    b[i].first = a[i].first + a[i].second;
    b[i].second = make_pair(a[i].first, i);
  }
  sort(b, b + m);
  for (int i = 1; i <= 2 * n; i++) z[i] = false;
  for (int i = 0; i < m; i++) {
    if (z[b[i].first]) cnt[b[i].second.second]++;
    z[b[i].first] = true;
  }
  reverse(b, b + m);
  for (int i = 1; i <= 2 * n; i++) z[i] = false;
  for (int i = 0; i < m; i++) {
    if (z[b[i].first]) cnt[b[i].second.second]++;
    z[b[i].first] = true;
  }
  int ans[10];
  for (int i = 0; i <= 8; i++) ans[i] = 0;
  for (int i = 0; i < m; i++) ans[cnt[i]]++;
  for (int i = 0; i <= 8; i++) cout << ans[i] << " ";
  return 0;
}
