#include <bits/stdc++.h>
using namespace std;
const long long MAX = 250000;
const long long offset = 100009;
const long long inf = 10000000000;
set<long long> ssrow[MAX], sscol[MAX], ssplus[MAX], ssminus[MAX];
long long n, m, x, y, z, p, q, r;
pair<long long, long long> queens[200000];
long long ans[10];
long long foreveryqueen[200000];
int main() {
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    scanf("%lld %lld", &x, &y);
    ssrow[x].insert(y);
    ssrow[x].insert(inf);
    sscol[y].insert(x);
    sscol[y].insert(inf);
    ssplus[x + y].insert(x);
    ssplus[x + y].insert(inf);
    ssminus[x - y + offset].insert(inf);
    ssminus[x - y + offset].insert(x);
    queens[i] = {x, y};
  }
  for (long long i = 1; i <= m; i++) {
    long long x = queens[i].first;
    long long y = queens[i].second;
    auto it = ssrow[x].find(y);
    if (it != ssrow[x].begin()) foreveryqueen[i]++;
    it++;
    if (*it != inf) foreveryqueen[i]++;
    it = sscol[y].find(x);
    if (it != sscol[y].begin()) foreveryqueen[i]++;
    it++;
    if (*it != inf) foreveryqueen[i]++;
    it = ssplus[x + y].find(x);
    if (it != ssplus[x + y].begin()) foreveryqueen[i]++;
    it++;
    if (*it != inf) foreveryqueen[i]++;
    it = ssminus[x - y + offset].find(x);
    if (it != ssminus[x - y + offset].begin()) foreveryqueen[i]++;
    it++;
    if (*it != inf) foreveryqueen[i]++;
    ans[foreveryqueen[i]]++;
  }
  for (long long i = 0; i <= 8; i++) cout << ans[i] << ' ';
  return 0;
}
