#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
const int INF = 10000000;
struct queen {
  int id, x, y;
} qns[N];
bool cmpX(queen a, queen b) { return a.x == b.x ? a.y < b.y : a.x < b.x; }
bool cmpY(queen a, queen b) { return a.y == b.y ? a.x < b.x : a.y < b.y; }
bool cmpDiagonalM(queen a, queen b) {
  return (a.x - a.y) == (b.x - b.y) ? a.x < b.x : (a.x - a.y) < (b.x - b.y);
}
int n, m, pre;
bool cmpDiagonalC(queen a, queen b) {
  return (a.x + a.y) == (b.x + b.y) ? a.x < b.x : (a.x + a.y) < (b.x + b.y);
}
int cnt[N], answer[9];
int main() {
  ios::sync_with_stdio(false);
  while (cin >> m >> n) {
    for (int i = 0; i < int(n); ++i) {
      qns[i].id = i;
      cin >> qns[i].x;
      cin >> qns[i].y;
    }
    memset(cnt, 0, sizeof(cnt));
    memset(answer, 0, sizeof(answer));
    sort(qns, qns + n, cmpX);
    pre = -INF;
    for (int i = 0; i < int(n); ++i) {
      if (qns[i].x == pre) {
        cnt[qns[i].id]++;
        cnt[qns[i - 1].id]++;
      }
      pre = qns[i].x;
    }
    sort(qns, qns + n, cmpY);
    pre = -INF;
    for (int i = 0; i < int(n); ++i) {
      if (qns[i].y == pre) {
        cnt[qns[i].id]++;
        cnt[qns[i - 1].id]++;
      }
      pre = qns[i].y;
    }
    pre = -INF;
    sort(qns, qns + n, cmpDiagonalM);
    for (int i = 0; i < int(n); ++i) {
      if (qns[i].x - qns[i].y == pre) {
        cnt[qns[i].id]++;
        cnt[qns[i - 1].id]++;
      }
      pre = qns[i].x - qns[i].y;
    }
    pre = -INF;
    sort(qns, qns + n, cmpDiagonalC);
    for (int i = 0; i < int(n); ++i) {
      if (qns[i].x + qns[i].y == pre) {
        cnt[qns[i].id]++;
        cnt[qns[i - 1].id]++;
      }
      pre = qns[i].x + qns[i].y;
    }
    for (int i = 0; i < int(n); ++i) answer[cnt[i]]++;
    for (int i = 0; i < int(9); ++i)
      printf("%d%c", answer[i], i == 8 ? '\n' : ' ');
  }
  return 0;
}
