#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
const int INF = 1e9 + 5;
int n, m, x[N], y[N], rmn[N], rmx[N], cmn[N], cmx[N], d1mn[N], d1mx[N], d2mn[N],
    d2mx[N], t[9];
void solve() {
  cin >> n >> m;
  for (int i = 1; i <= 2 * n; ++i) {
    rmn[i] = INF;
    rmx[i] = -INF;
    cmn[i] = INF;
    cmx[i] = -INF;
    d1mn[i] = INF;
    d1mx[i] = -INF;
    d2mn[i] = INF;
    d2mx[i] = -INF;
  }
  for (int i = 1; i <= m; ++i) {
    cin >> x[i] >> y[i];
    rmn[x[i]] = min(rmn[x[i]], y[i]);
    rmx[x[i]] = max(rmx[x[i]], y[i]);
    cmn[y[i]] = min(cmn[y[i]], x[i]);
    cmx[y[i]] = max(cmx[y[i]], x[i]);
    d1mn[x[i] - y[i] + n] = min(d1mn[x[i] - y[i] + n], x[i] + y[i]);
    d1mx[x[i] - y[i] + n] = max(d1mx[x[i] - y[i] + n], x[i] + y[i]);
    d2mn[x[i] + y[i]] = min(d2mn[x[i] + y[i]], x[i] - y[i] + n);
    d2mx[x[i] + y[i]] = max(d2mx[x[i] + y[i]], x[i] - y[i] + n);
  }
  for (int i = 1; i <= m; ++i) {
    int cnt = 0;
    if (rmn[x[i]] != y[i]) ++cnt;
    if (rmx[x[i]] != y[i]) ++cnt;
    if (cmn[y[i]] != x[i]) ++cnt;
    if (cmx[y[i]] != x[i]) ++cnt;
    if (d1mn[x[i] - y[i] + n] != x[i] + y[i]) ++cnt;
    if (d1mx[x[i] - y[i] + n] != x[i] + y[i]) ++cnt;
    if (d2mn[x[i] + y[i]] != x[i] - y[i] + n) ++cnt;
    if (d2mx[x[i] + y[i]] != x[i] - y[i] + n) ++cnt;
    ++t[cnt];
  }
  for (int i = 0; i <= 8; ++i) {
    cout << t[i] << ' ';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tt = 1;
  while (tt--) {
    solve();
  }
  return 0;
}
