#include <bits/stdc++.h>
using namespace std;
const int MAXN = 35;
int n, m, k, t, a, b, s, x, y;
map<int, pair<int, int> > hor{}, ver{}, sl{}, obr{};
vector<pair<int, int> > figs{};
int ans[9];
pair<int, int>* p;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; ++i) {
    scanf("%d %d", &x, &y);
    figs.push_back(make_pair(x, y));
    if (ver.count(y) == 0) {
      ver[y] = make_pair(x, x);
    } else {
      p = &ver[y];
      p->first = min(p->first, x);
      p->second = max(p->second, x);
    }
    if (hor.count(x) == 0) {
      hor[x] = make_pair(y, y);
    } else {
      p = &hor[x];
      p->first = min(p->first, y);
      p->second = max(p->second, y);
    }
    int d = x - y;
    if (sl.count(d) == 0) {
      sl[d] = make_pair(x, x);
    } else {
      p = &sl[d];
      p->first = min(p->first, x);
      p->second = max(p->second, x);
    }
    d = x + y;
    if (obr.count(d) == 0) {
      obr[d] = make_pair(x, x);
    } else {
      p = &obr[d];
      p->first = min(p->first, x);
      p->second = max(p->second, x);
    }
  }
  for (int i = 0; i < m; ++i) {
    pair<int, int> fig = figs[i];
    int res = 8;
    int x = fig.first;
    int y = fig.second;
    res -= hor[x].first == y;
    res -= hor[x].second == y;
    res -= ver[y].first == x;
    res -= ver[y].second == x;
    res -= sl[x - y].first == x;
    res -= sl[x - y].second == x;
    res -= obr[x + y].first == x;
    res -= obr[x + y].second == x;
    ans[res]++;
  }
  for (int i = 0; i < 9; ++i) {
    printf("%d ", ans[i]);
  }
  return 0;
}
