#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x, y;
  scanf("%d%d", &n, &m);
  vector<pair<pair<int, int>, pair<int, int> > > p1;
  for (int i = 0; i < m; ++i) {
    scanf("%d%d", &x, &y);
    p1.push_back(make_pair(make_pair(x, y), make_pair(i, 0)));
  }
  for (int pov = 0; pov < 8; ++pov) {
    sort(p1.begin(), p1.end());
    int last_y = -1000000000;
    for (int i = 0; i < m; ++i) {
      if (p1[i].first.first != last_y) {
        last_y = p1[i].first.first;
      } else
        p1[i].second.second++;
      p1[i].first = make_pair(p1[i].first.first - p1[i].first.second,
                              p1[i].first.first + p1[i].first.second);
    }
  }
  int ans[10] = {};
  for (int i = 0; i < m; ++i) ans[p1[i].second.second]++;
  for (int i = 0; i < 9; ++i) printf("%d ", ans[i]);
  return 0;
}
