#include <bits/stdc++.h>
using namespace std;
const int N = 1000010, inf = 1000000007, mod = inf;
int n, m, a[N];
int vrsta[N], kolona[N], gdi[2 * N], sdi[2 * N];
char s[N];
pair<int, int> p[N];
int pr[10];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    p[i] = {x, y};
  }
  sort(p + 1, p + m + 1);
  for (int i = 1; i <= m; i++) {
    int x = p[i].first, y = p[i].second;
    if (vrsta[x]) a[vrsta[x]]++, a[i]++;
    vrsta[x] = i;
    if (kolona[y]) a[kolona[y]]++, a[i]++;
    kolona[y] = i;
    if (gdi[x - y + N]) a[gdi[x - y + N]]++, a[i]++;
    gdi[x - y + N] = i;
    if (sdi[x + y]) a[sdi[x + y]]++, a[i]++;
    sdi[x + y] = i;
  }
  for (int i = 1; i <= m; i++) pr[a[i]]++;
  for (int i = 0; i <= 8; i++) printf("%d ", pr[i]);
  return 0;
}
