#include <bits/stdc++.h>
using namespace std;
int n, m, r, c, w[100010], t[9];
pair<int, int> in[100010];
vector<int> v[100010], h[100010], d1[200010], d2[200010];
int main() {
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    cin >> r >> c;
    in[i] = pair<int, int>(r - 1, c - 1);
  }
  sort(in, in + m);
  for (long long i = 0; i < m; i++) {
    v[in[i].second].push_back(i);
    h[in[i].first].push_back(i);
    d1[in[i].second + in[i].first].push_back(i);
    d2[in[i].second - in[i].first + 100000].push_back(i);
  }
  for (long long i = 0; i < n; i++) {
    if (v[i].size() > 1)
      for (long long j = 0; j < v[i].size(); j++) {
        w[v[i][j]] += j > 0 && j < v[i].size() - 1 ? 2 : 1;
      }
    if (h[i].size() > 1)
      for (long long j = 0; j < h[i].size(); j++) {
        w[h[i][j]] += j > 0 && j < h[i].size() - 1 ? 2 : 1;
      }
  }
  for (long long i = 0; i < 200010; i++) {
    if (d1[i].size() > 1)
      for (long long j = 0; j < d1[i].size(); j++) {
        w[d1[i][j]] += j > 0 && j < d1[i].size() - 1 ? 2 : 1;
      }
    if (d2[i].size() > 1)
      for (long long j = 0; j < d2[i].size(); j++) {
        w[d2[i][j]] += j > 0 && j < d2[i].size() - 1 ? 2 : 1;
      }
  }
  for (long long i = 0; i < m; i++) {
    t[w[i]]++;
  }
  for (long long i = 0; i < 9; i++) cout << t[i] << " ";
}
