#include <bits/stdc++.h>
using namespace std;
inline void read(register int *n) {
  register char c;
  *n = 0;
  do {
    c = getchar();
  } while (c < '0' || c > '9');
  do {
    *n = c - '0' + *n * 10;
    c = getchar();
  } while (c >= '0' && c <= '9');
}
vector<int> d1[111 * 1000 * 2], d2[111 * 1000 * 2], r[111 * 1000],
    c[111 * 1000];
vector<pair<int, int> > p;
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  p.resize(m);
  for (register int i = (0); i < (int)(m); ++i) {
    cin >> p[i].first >> p[i].second;
    d1[p[i].first + p[i].second].push_back(p[i].first - p[i].second);
    d2[p[i].first - p[i].second + 111 * 1000].push_back(p[i].first +
                                                        p[i].second);
    r[p[i].first].push_back(p[i].second);
    c[p[i].second].push_back(p[i].first);
  }
  for (register int i = (0); i < (int)(111 * 1000 * 2); ++i)
    sort((d1[i]).begin(), (d1[i]).end()), sort((d2[i]).begin(), (d2[i]).end());
  for (register int i = (0); i < (int)(111 * 1000); ++i)
    sort((r[i]).begin(), (r[i]).end()), sort((c[i]).begin(), (c[i]).end());
  int t[9];
  memset(t, 0, sizeof t);
  for (register int i = (0); i < (int)(m); ++i) {
    int cnt = 0;
    if (d1[p[i].first + p[i].second][0] != p[i].first - p[i].second) cnt++;
    if (d1[p[i].first + p[i].second].back() != p[i].first - p[i].second) cnt++;
    if (d2[p[i].first - p[i].second + 111 * 1000][0] !=
        p[i].first + p[i].second)
      cnt++;
    if (d2[p[i].first - p[i].second + 111 * 1000].back() !=
        p[i].first + p[i].second)
      cnt++;
    if (r[p[i].first][0] != p[i].second) cnt++;
    if (r[p[i].first].back() != p[i].second) cnt++;
    if (c[p[i].second][0] != p[i].first) cnt++;
    if (c[p[i].second].back() != p[i].first) cnt++;
    t[cnt]++;
  }
  for (register int i = (0); i < (int)(9); ++i) cout << t[i] << " ";
  cout << "\n";
  return 0;
}
