#include <bits/stdc++.h>
using namespace std;
int n, m, r[100005], c[100005], kol[9] = {};
set<int> row[100005], col[100005], d1[200005], d2[200005];
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> r[i] >> c[i];
    row[r[i]].insert(c[i]);
    col[c[i]].insert(r[i]);
    d1[c[i] - r[i] + n].insert(r[i]);
    d2[c[i] + r[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[c[i] - r[i] + n].begin() < r[i]) cnt++;
    if (*d1[c[i] - r[i] + n].rbegin() > r[i]) cnt++;
    if (*d2[c[i] + r[i] - 1].begin() < r[i]) cnt++;
    if (*d2[c[i] + r[i] - 1].rbegin() > r[i]) cnt++;
    kol[cnt]++;
  }
  for (int i = 0; i <= 8; i++) cout << kol[i] << " ";
  return 0;
}
