#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
int d[maxn], sum[10];
struct point {
  int x, y, z, f, i;
  point(int x, int y, int z, int f, int i) : x(x), y(y), z(z), f(f), i(i) {}
};
bool cmp1(const point& a, const point& b) {
  return a.y < b.y || (a.y == b.y && a.x < b.x);
}
bool cmp2(const point& a, const point& b) {
  return a.x < b.x || (a.x == b.x && a.y < b.y);
}
bool cmp3(const point& a, const point& b) {
  return a.z < b.z || (a.z == b.z && a.x < b.x);
}
bool cmp4(const point& a, const point& b) {
  return a.f < b.f || (a.f == b.f && a.x < b.x);
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<point> a;
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    a.push_back(point(x, y, y - x, x + y, i));
  }
  sort(a.begin(), a.end(), cmp1);
  memset(d, 0, sizeof(d));
  for (int i = 0; i < m - 1; i++) {
    if (a[i].y == a[i + 1].y) {
      point &u = a[i], &v = a[i + 1];
      if (u.x < v.x) {
        d[u.i]++;
        d[v.i]++;
      }
    }
  }
  sort(a.begin(), a.end(), cmp2);
  for (int i = 0; i < m - 1; i++) {
    if (a[i].x == a[i + 1].x) {
      point &u = a[i], &v = a[i + 1];
      if (u.y < v.y) {
        d[u.i]++;
        d[v.i]++;
      }
    }
  }
  sort(a.begin(), a.end(), cmp3);
  for (int i = 0; i < m - 1; i++) {
    if (a[i].z == a[i + 1].z) {
      point &u = a[i], &v = a[i + 1];
      if (u.x < v.x) {
        d[u.i]++;
        d[v.i]++;
      }
    }
  }
  sort(a.begin(), a.end(), cmp4);
  for (int i = 0; i < m - 1; i++) {
    if (a[i].f == a[i + 1].f) {
      point &u = a[i], &v = a[i + 1];
      if (u.x < v.x) {
        d[u.i]++;
        d[v.i]++;
      }
    }
  }
  memset(sum, 0, sizeof(sum));
  for (int i = 0; i < m; i++) {
    int s = d[i];
    sum[s]++;
  }
  for (int i = 0; i < 9; i++) {
    printf("%d", sum[i]);
    if (i == 8)
      printf("\n");
    else
      printf(" ");
  }
  return 0;
}
