#include <bits/stdc++.h>
using namespace std;
vector<vector<pair<int, int> > > vec;
pair<int, int> pos[100005];
int net[100005];
int main() {
  int n, m;
  cin >> n >> m;
  int x, y;
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    pos[i].first = x;
    pos[i].second = y;
  }
  for (int i = 1; i <= n; i++) {
    net[i] = 0;
  }
  vec.resize(0);
  vec.resize(n + 5);
  for (int i = 1; i <= m; i++) {
    vec[pos[i].first].push_back(make_pair(pos[i].second, i));
  }
  for (int i = 1; i <= n; i++) {
    sort(vec[i].begin(), vec[i].end());
    if (vec[i].size() >= 2) {
      int si = vec[i].size();
      net[vec[i][0].second]++;
      net[vec[i][si - 1].second]++;
      for (int j = 1; j < si - 1; j++) {
        net[vec[i][j].second] += 2;
      }
    }
  }
  vec.resize(0);
  vec.resize(n + 5);
  for (int i = 1; i <= m; i++) {
    vec[pos[i].second].push_back(make_pair(pos[i].first, i));
  }
  for (int i = 1; i <= n; i++) {
    sort(vec[i].begin(), vec[i].end());
    if (vec[i].size() >= 2) {
      int si = vec[i].size();
      net[vec[i][0].second]++;
      net[vec[i][si - 1].second]++;
      for (int j = 1; j < si - 1; j++) {
        net[vec[i][j].second] += 2;
      }
    }
  }
  vec.resize(0);
  vec.resize(2 * n + 5);
  for (int i = 1; i <= m; i++) {
    vec[pos[i].second - pos[i].first + n].push_back(
        make_pair(pos[i].second, i));
  }
  for (int i = 0; i <= 2 * n + 1; i++) {
    sort(vec[i].begin(), vec[i].end());
    if (vec[i].size() >= 2) {
      int si = vec[i].size();
      net[vec[i][0].second]++;
      net[vec[i][si - 1].second]++;
      for (int j = 1; j < si - 1; j++) {
        net[vec[i][j].second] += 2;
      }
    }
  }
  vec.resize(0);
  vec.resize(2 * n + 5);
  for (int i = 1; i <= m; i++) {
    vec[pos[i].first + pos[i].second].push_back(make_pair(pos[i].second, i));
  }
  for (int i = 0; i <= 2 * n + 1; i++) {
    sort(vec[i].begin(), vec[i].end());
    if (vec[i].size() >= 2) {
      int si = vec[i].size();
      net[vec[i][0].second]++;
      net[vec[i][si - 1].second]++;
      for (int j = 1; j < si - 1; j++) {
        net[vec[i][j].second] += 2;
      }
    }
  }
  int adfd;
  int t[9];
  for (int i = 0; i <= 8; i++) {
    t[i] = 0;
  }
  for (int i = 1; i <= m; i++) {
    t[net[i]]++;
  }
  for (int i = 0; i <= 8; i++) {
    cout << t[i] << " ";
  }
  cout << endl;
  return 0;
}
