#include <bits/stdc++.h>
using namespace std;
int const N = 100005;
int t1[N], t2[N], t3[2 * N], t4[2 * N];
int c1[N], c2[N], c3[2 * N], c4[2 * N];
int ans[10];
struct node {
  int x, y, pos;
  void read() { scanf("%d%d", &x, &y); }
} p[N];
bool cmp(node p1, node p2) {
  if (p1.y != p2.y)
    return p1.y < p2.y;
  else
    return p1.x < p2.x;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    p[i].read();
    t1[p[i].x]++;
    t2[p[i].y]++;
    t3[n + p[i].x - p[i].y]++;
    t4[p[i].x + p[i].y]++;
  }
  sort(p + 1, p + m + 1, cmp);
  int c;
  for (int i = 1; i <= m; i++) {
    c = 0;
    if (c1[p[i].x]) c++;
    if (c2[p[i].y]) c++;
    if (c3[n + p[i].x - p[i].y]) c++;
    if (c4[p[i].x + p[i].y]) c++;
    c1[p[i].x]++;
    c2[p[i].y]++;
    c3[n + p[i].x - p[i].y]++;
    c4[p[i].x + p[i].y]++;
    if (t1[p[i].x] - c1[p[i].x]) c++;
    if (t2[p[i].y] - c2[p[i].y]) c++;
    if (t3[n + p[i].x - p[i].y] - c3[n + p[i].x - p[i].y]) c++;
    if (t4[p[i].x + p[i].y] - c4[p[i].x + p[i].y]) c++;
    ans[c]++;
  }
  for (int i = 0; i < 8; i++) printf("%d ", ans[i]);
  printf("%d", ans[8]);
  return 0;
}
