#include <bits/stdc++.h>
using namespace std;
struct Queen {
  int r, c, i, a, b;
  bool operator<(const Queen& q) const {
    return a < q.a || (a == q.a && b < q.b);
  }
};
int n, m;
Queen a[100000];
int cnt[100000];
int res[9];
void gao() {
  sort(a, a + m);
  for (int i = 1; i < m; ++i) {
    if (a[i - 1].a == a[i].a) {
      ++cnt[a[i - 1].i];
      ++cnt[a[i].i];
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    scanf("%d%d", &a[i].r, &a[i].c);
    a[i].i = i;
  }
  memset(cnt, 0, sizeof(cnt));
  memset(res, 0, sizeof(res));
  for (int i = 0; i < m; ++i) {
    a[i].a = a[i].r;
    a[i].b = a[i].c;
  }
  gao();
  for (int i = 0; i < m; ++i) {
    a[i].a = a[i].c;
    a[i].b = a[i].r;
  }
  gao();
  for (int i = 0; i < m; ++i) {
    a[i].a = a[i].r - a[i].c;
    a[i].b = a[i].r;
  }
  gao();
  for (int i = 0; i < m; ++i) {
    a[i].a = a[i].r + a[i].c;
    a[i].b = a[i].r;
  }
  gao();
  for (int i = 0; i < m; ++i) {
    ++res[cnt[i]];
  }
  for (int i = 0; i <= 8; ++i) {
    printf("%d%c", res[i], i == 8 ? '\n' : ' ');
  }
  return 0;
}
