#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000;
vector<pair<int, int> > r[maxn], c[maxn], md[2 * maxn], sd[2 * maxn];
int cnt[maxn];
int res[9];
int n, m;
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int ri, ci;
    scanf("%d%d", &ri, &ci);
    ri--;
    ci--;
    r[ri].push_back(make_pair(ci, i));
    c[ci].push_back(make_pair(ri, i));
    md[ri - ci + n].push_back(make_pair(ci, i));
    sd[ri + ci].push_back(make_pair(ci, i));
  }
  for (int i = 0; i < n; i++)
    if (!r[i].empty()) sort(r[i].begin(), r[i].end());
  for (int i = 0; i < n; i++)
    if (!c[i].empty()) sort(c[i].begin(), c[i].end());
  for (int i = 0; i < n * 2; i++)
    if (!md[i].empty()) sort(md[i].begin(), md[i].end());
  for (int i = 0; i < n * 2; i++)
    if (!sd[i].empty()) sort(sd[i].begin(), sd[i].end());
  for (int i = 0; i < n; i++) {
    if (r[i].size() > 1) cnt[r[i][0].second]++, cnt[r[i].back().second]++;
    for (int j = 1; j < (int)r[i].size() - 1; j++) cnt[r[i][j].second] += 2;
  }
  for (int i = 0; i < n; i++) {
    if (c[i].size() > 1) cnt[c[i][0].second]++, cnt[c[i].back().second]++;
    for (int j = 1; j < (int)c[i].size() - 1; j++) cnt[c[i][j].second] += 2;
  }
  for (int i = 0; i < 2 * maxn; i++) {
    if (md[i].size() > 1) cnt[md[i][0].second]++, cnt[md[i].back().second]++;
    for (int j = 1; j < (int)md[i].size() - 1; j++) cnt[md[i][j].second] += 2;
  }
  for (int i = 0; i < 2 * maxn; i++) {
    if (sd[i].size() > 1) cnt[sd[i][0].second]++, cnt[sd[i].back().second]++;
    for (int j = 1; j < (int)sd[i].size() - 1; j++) cnt[sd[i][j].second] += 2;
  }
  for (int i = 0; i < m; i++) {
    res[cnt[i]]++;
  }
  for (int i = 0; i < 9; i++) cout << res[i] << " ";
  return 0;
}
