#include <bits/stdc++.h>
using namespace std;
int n, m, r[100005], c[100005], T[15];
set<int> row[100005], col[100005], d1[100005 * 2], d2[100005 * 2];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &r[i], &c[i]);
    row[r[i]].insert(c[i]);
    col[c[i]].insert(r[i]);
    d1[r[i] - c[i] + n].insert(r[i]);
    d2[r[i] + c[i] - 1].insert(r[i]);
  }
  for (int i = 0; i < m; i++) {
    int cnt = 0;
    if (*row[r[i]].begin() < c[i]) cnt++;
    if (*row[r[i]].rbegin() > c[i]) cnt++;
    if (*col[c[i]].begin() < r[i]) cnt++;
    if (*col[c[i]].rbegin() > r[i]) cnt++;
    if (*d1[r[i] - c[i] + n].begin() < r[i]) cnt++;
    if (*d1[r[i] - c[i] + n].rbegin() > r[i]) cnt++;
    if (*d2[r[i] + c[i] - 1].begin() < r[i]) cnt++;
    if (*d2[r[i] + c[i] - 1].rbegin() > r[i]) cnt++;
    T[cnt]++;
  }
  for (int i = 0; i <= 8; i++) {
    printf("%d ", T[i]);
  }
  return 0;
}
