#include <bits/stdc++.h>
using namespace std;
vector<int> v[800001], g[800001], d1[800001], d2[800001];
pair<int, int> a[800001];
int b[10];
int n, m;
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a[i].first >> a[i].second;
    v[a[i].first].push_back(a[i].second);
    g[a[i].second].push_back(a[i].first);
    d1[a[i].first - a[i].second + 400000].push_back(a[i].second);
    d2[a[i].first + a[i].second + 400000].push_back(a[i].second);
  }
  for (int i = 0; i <= 800000; i++) {
    sort(v[i].begin(), v[i].end());
    sort(g[i].begin(), g[i].end());
    sort(d1[i].begin(), d1[i].end());
    sort(d2[i].begin(), d2[i].end());
  }
  for (int i = 0; i < m; i++) {
    int tr = 0;
    if (lower_bound(v[a[i].first].begin(), v[a[i].first].end(), a[i].second) -
            v[a[i].first].begin() >
        0) {
      tr++;
    }
    if (lower_bound(v[a[i].first].begin(), v[a[i].first].end(), a[i].second) -
            v[a[i].first].begin() <
        v[a[i].first].size() - 1) {
      tr++;
    }
    if (lower_bound(g[a[i].second].begin(), g[a[i].second].end(), a[i].first) -
            g[a[i].second].begin() >
        0) {
      tr++;
    }
    if (lower_bound(g[a[i].second].begin(), g[a[i].second].end(), a[i].first) -
            g[a[i].second].begin() <
        g[a[i].second].size() - 1) {
      tr++;
    }
    if (lower_bound(d1[a[i].first - a[i].second + 400000].begin(),
                    d1[a[i].first - a[i].second + 400000].end(), a[i].second) -
            d1[a[i].first - a[i].second + 400000].begin() >
        0) {
      tr++;
    }
    if (lower_bound(d1[a[i].first - a[i].second + 400000].begin(),
                    d1[a[i].first - a[i].second + 400000].end(), a[i].second) -
            d1[a[i].first - a[i].second + 400000].begin() <
        d1[a[i].first - a[i].second + 400000].size() - 1) {
      tr++;
    }
    if (lower_bound(d2[a[i].first + a[i].second + 400000].begin(),
                    d2[a[i].first + a[i].second + 400000].end(), a[i].second) -
            d2[a[i].first + a[i].second + 400000].begin() >
        0) {
      tr++;
    }
    if (lower_bound(d2[a[i].first + a[i].second + 400000].begin(),
                    d2[a[i].first + a[i].second + 400000].end(), a[i].second) -
            d2[a[i].first + a[i].second + 400000].begin() <
        d2[a[i].first + a[i].second + 400000].size() - 1) {
      tr++;
    }
    b[tr]++;
  }
  for (int i = 0; i < 9; i++) {
    cout << b[i] << " ";
  }
  return 0;
}
