#include <bits/stdc++.h>
using namespace std;
struct node {
  int n, x, y;
} a[100100];
bool cmp(node a, node b) {
  if (a.x < b.x)
    return 1;
  else if (a.x > b.x)
    return 0;
  else
    return (a.y < b.y);
}
bool cmp2(node a, node b) {
  if (a.y < b.y)
    return 1;
  else if (a.y > b.y)
    return 0;
  else
    return (a.x < b.x);
}
bool cmp3(node a, node b) {
  if (a.x + a.y < b.x + b.y)
    return 1;
  else if (a.x + a.y > b.x + b.y)
    return 0;
  else
    return (a.x < b.x);
}
bool cmp4(node a, node b) {
  if (a.x - a.y < b.x - b.y)
    return 1;
  else if (a.x - a.y > b.x - b.y)
    return 0;
  else
    return (a.x < b.x);
}
int qb[100010];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    a[i].n = i;
    a[i].x = x;
    a[i].y = y;
  }
  memset(qb, 0, sizeof(qb));
  sort(a, a + m, cmp);
  for (int i = 0; i < m - 1; i++) {
    if (a[i].x == a[i + 1].x) {
      qb[a[i].n]++;
      qb[a[i + 1].n]++;
    }
  }
  sort(a, a + m, cmp2);
  for (int i = 0; i < m - 1; i++) {
    if (a[i].y == a[i + 1].y) {
      qb[a[i].n]++;
      qb[a[i + 1].n]++;
    }
  }
  sort(a, a + m, cmp3);
  for (int i = 0; i < m - 1; i++) {
    if (a[i].y + a[i].x == a[i + 1].y + a[i + 1].x) {
      qb[a[i].n]++;
      qb[a[i + 1].n]++;
    }
  }
  sort(a, a + m, cmp4);
  for (int i = 0; i < m - 1; i++) {
    if (-a[i].y + a[i].x == -a[i + 1].y + a[i + 1].x) {
      qb[a[i].n]++;
      qb[a[i + 1].n]++;
    }
  }
  int ans[10] = {0};
  for (int i = 0; i < m; i++) {
    ans[qb[i]]++;
  }
  for (int i = 0; i <= 8; i++) {
    printf("%d", ans[i]);
    printf("%c", i == 8 ? '\n' : ' ');
  }
}
