#include <bits/stdc++.h>
using namespace std;
struct pos {
  int x, y, d1, d2, n;
  pos(void){};
  pos(int a, int b, int sz) {
    n = 0;
    x = a;
    y = b;
    d1 = a + b + 1;
    d2 = sz - b + a;
  }
};
pos V[100000];
bool less1(pos &a, pos &b) { return a.x < b.x || (a.x == b.x && a.y < b.y); }
bool less2(pos &a, pos &b) { return a.y < b.y || (a.y == b.y && a.x < b.x); }
bool less3(pos &a, pos &b) {
  return a.d1 < b.d1 || (a.d1 == b.d1 && a.x < b.x);
}
bool less4(pos &a, pos &b) {
  return a.d2 < b.d2 || (a.d2 == b.d2 && a.x < b.x);
}
int main(void) {
  int a, b, n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    V[i] = pos(a, b, n);
  }
  sort(V, V + m, less1);
  for (int i = 1; i < m; i++)
    if (V[i].x == V[i - 1].x) V[i].n++, V[i - 1].n++;
  sort(V, V + m, less2);
  for (int i = 1; i < m; i++)
    if (V[i].y == V[i - 1].y) V[i].n++, V[i - 1].n++;
  sort(V, V + m, less3);
  for (int i = 1; i < m; i++)
    if (V[i].d1 == V[i - 1].d1) V[i].n++, V[i - 1].n++;
  sort(V, V + m, less4);
  for (int i = 1; i < m; i++)
    if (V[i].d2 == V[i - 1].d2) V[i].n++, V[i - 1].n++;
  int R[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
  for (int i = 0; i < m; i++) R[V[i].n]++;
  for (int i = 0; i < 9; i++) cout << R[i] << " ";
  return 0;
}
