#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
pair<int, int> h[N];
pair<int, int> v[N];
pair<int, int> d[2][N];
pair<int, int> c[N];
template <class T, class U>
T smallerlargest(T begin, T end, U val) {
  auto it = lower_bound(begin, end, val);
  it--;
  return it;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int m;
  cin >> m;
  for (int i = 0, first, second; i < m; ++i) {
    cin >> first >> second;
    c[i] = pair<int, int>(first, second);
    h[i] = pair<int, int>(second, first);
    v[i] = pair<int, int>(first, second);
    d[0][i] = pair<int, int>(first - second, first);
    d[1][i] = pair<int, int>(first + second, first);
  }
  sort(h, h + m);
  sort(v, v + m);
  sort(d[0], d[0] + m);
  sort(d[1], d[1] + m);
  vector<int> cnt(9, 0);
  for (int i = 0; i < m; i++) {
    int t = 0;
    auto it = smallerlargest(h, h + m, pair<int, int>(c[i].second, c[i].first));
    if (!(it < h or it->first < c[i].second)) {
      t++;
    }
    it = upper_bound(h, h + m, pair<int, int>(c[i].second, c[i].first));
    if (!(it >= h + m or it->first > c[i].second)) {
      t++;
    }
    it = smallerlargest(v, v + m, pair<int, int>(c[i].first, c[i].second));
    if (!(it < v or it->first < c[i].first)) {
      t++;
    }
    it = upper_bound(v, v + m, pair<int, int>(c[i].first, c[i].second));
    if (!(it >= v + m or it->first > c[i].first)) {
      t++;
    }
    int ds = c[i].first - c[i].second;
    it = smallerlargest(d[0], d[0] + m, pair<int, int>(ds, c[i].first));
    if (!(it < d[0] or it->first < ds)) t++;
    it = upper_bound(d[0], d[0] + m, pair<int, int>(ds, c[i].first));
    if (!(it >= d[0] + m or it->first > ds)) t++;
    ds = c[i].first + c[i].second;
    it = smallerlargest(d[1], d[1] + m, pair<int, int>(ds, c[i].first));
    if (!(it < d[1] or it->first < ds)) t++;
    it = upper_bound(d[1], d[1] + m, pair<int, int>(ds, c[i].first));
    if (!(it >= d[1] + m or it->first > ds)) t++;
    cnt[t]++;
  }
  for (int i = 0; i < 9; ++i) {
    cout << cnt[i] << " ";
  }
}
