#include <bits/stdc++.h>
using namespace std;
void io() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
int32_t main() {
  io();
  map<long long, vector<pair<long long, long long> > > row, col, d1, d2;
  long long n, m, x, y;
  cin >> n >> m;
  vector<long long> ans(m);
  for (long long i = 0; i < m; i++) {
    cin >> x >> y;
    row[x].push_back({y, i});
    col[y].push_back({x, i});
    d1[x + y].push_back({x, i});
    d2[x - y].push_back({x, i});
  }
  for (auto &i : row) {
    sort(i.second.begin(), i.second.end());
    for (auto &j : i.second) {
      ans[j.second] += 2;
    }
    ans[i.second[0].second]--;
    ans[i.second.back().second]--;
  }
  for (auto &i : col) {
    sort(i.second.begin(), i.second.end());
    for (auto &j : i.second) {
      ans[j.second] += 2;
    }
    ans[i.second[0].second]--;
    ans[i.second.back().second]--;
  }
  for (auto &i : d1) {
    sort(i.second.begin(), i.second.end());
    for (auto &j : i.second) {
      ans[j.second] += 2;
    }
    ans[i.second[0].second]--;
    ans[i.second.back().second]--;
  }
  for (auto &i : d2) {
    sort(i.second.begin(), i.second.end());
    for (auto &j : i.second) {
      ans[j.second] += 2;
    }
    ans[i.second[0].second]--;
    ans[i.second.back().second]--;
  }
  vector<long long> t(9);
  for (auto &i : ans) t[i]++;
  for (auto &i : t) cout << i << " ";
}
