#include <bits/stdc++.h>
using namespace std;
void f(int &oldValue, int newValue, vector<int> &count) {
  if (oldValue != -1) {
    count[oldValue]++;
    count[newValue]++;
  }
  oldValue = newValue;
}
int main() {
  int n, m;
  cin >> n >> m;
  const int MAX = 222222;
  vector<int> sum(MAX, -1), diff(MAX, -1), row(MAX, -1), col(MAX, -1);
  vector<pair<int, int> > v;
  v.reserve(m + 2);
  for (int i = 0; i < m; i++) {
    int r, c;
    cin >> r >> c;
    v.push_back(pair<int, int>(r, c));
  }
  sort(begin(v), end(v));
  vector<int> count(m, 0);
  for (int i = 0; i < m; i++) {
    int r = v[i].first, c = v[i].second;
    f(row[r], i, count);
    f(col[c], i, count);
    f(sum[r + c], i, count);
    f(diff[r - c + n], i, count);
  }
  vector<int> res(9, 0);
  for_each(begin(count), end(count), [&](int a) { res[a]++; });
  for_each(begin(res), end(res), [&](int a) { cout << a << " "; });
}
