#include <bits/stdc++.h>
using namespace std;
int n, m, f1, f2, f3, f4, x, y, res[100001], ans[1001];
pair<pair<int, int>, int> a[100002], b[100002], c[100002], d[100002];
int main() {
  cin >> n >> m;
  a[0].first.first = 999999;
  b[0].first.first = 999999;
  c[0].first.first = 999999;
  d[0].first.first = 999999;
  a[m + 1].first.first = 999999;
  b[m + 1].first.first = 999999;
  c[m + 1].first.first = 999999;
  d[m + 1].first.first = 999999;
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    a[i].first.first = x;
    a[i].first.second = y;
    a[i].second = i;
    b[i].first.first = y;
    b[i].first.second = x;
    b[i].second = i;
    c[i].first.first = x - y;
    c[i].first.second = x;
    c[i].second = i;
    d[i].first.first = x + y;
    d[i].first.second = y;
    d[i].second = i;
  }
  sort(a + 1, a + m + 1);
  sort(b + 1, b + m + 1);
  sort(c + 1, c + m + 1);
  sort(d + 1, d + m + 1);
  for (int i = 1; i <= m; i++) {
    if (a[i].first.first == a[i + 1].first.first) res[a[i].second]++;
    if (a[i].first.first == a[i - 1].first.first) res[a[i].second]++;
    if (b[i].first.first == b[i + 1].first.first) res[b[i].second]++;
    if (b[i].first.first == b[i - 1].first.first) res[b[i].second]++;
    if (c[i].first.first == c[i + 1].first.first) res[c[i].second]++;
    if (c[i].first.first == c[i - 1].first.first) res[c[i].second]++;
    if (d[i].first.first == d[i + 1].first.first) res[d[i].second]++;
    if (d[i].first.first == d[i - 1].first.first) res[d[i].second]++;
  }
  for (int i = 1; i <= m; i++) {
    ans[res[i]]++;
  }
  for (int i = 0; i <= 8; i++) cout << ans[i] << " ";
}
