#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, m;
long long x[N], y[N], cnt[N], ans[N];
map<long long, vector<pair<long long, long long> > > xcoord, ycoord, diag1,
    diag2;
void work(map<long long, vector<pair<long long, long long> > > &cur) {
  for (auto &it : cur) {
    long long sz = it.second.size();
    sort(it.second.begin(), it.second.end());
    for (long long j = 0; j < sz - 1; j++) {
      cnt[it.second[j].second]++;
      cnt[it.second[j + 1].second]++;
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    cin >> x[i] >> y[i];
    xcoord[x[i]].push_back({y[i], i});
    ycoord[y[i]].push_back({x[i], i});
    diag1[x[i] - y[i]].push_back({x[i] + y[i], i});
    diag2[x[i] + y[i]].push_back({x[i] - y[i], i});
  }
  work(xcoord);
  work(ycoord);
  work(diag1);
  work(diag2);
  for (long long i = 1; i <= m; i++) ans[cnt[i]]++;
  for (long long i = 0; i <= 8; i++) cout << ans[i] << " ";
  return 0;
}
