#include <bits/stdc++.h>
using namespace std;
int rowf[100001], rowl[100001], colf[100001], coll[100001], updf[2 * 100001],
    updl[2 * 100001], downdf[2 * 100001], downdl[2 * 100001];
int r[100001], c[100001];
int t[9];
int main() {
  memset(rowf, 0, sizeof(rowf));
  memset(rowl, 0, sizeof(rowl));
  memset(colf, 0, sizeof(colf));
  memset(coll, 0, sizeof(coll));
  memset(updf, 0, sizeof(updf));
  memset(updl, 0, sizeof(updl));
  memset(r, 0, sizeof(r));
  memset(c, 0, sizeof(c));
  memset(t, 0, sizeof(t));
  memset(downdl, 0, sizeof(downdl));
  memset(downdf, 0, sizeof(downdf));
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; ++i) {
    scanf("%d %d", &r[i], &c[i]);
    if (rowf[r[i]] == 0)
      rowf[r[i]] = c[i];
    else
      rowf[r[i]] = min(rowf[r[i]], c[i]);
    if (rowl[r[i]] == 0)
      rowl[r[i]] = c[i];
    else
      rowl[r[i]] = max(rowl[r[i]], c[i]);
    if (colf[c[i]] == 0)
      colf[c[i]] = r[i];
    else
      colf[c[i]] = min(colf[c[i]], r[i]);
    if (coll[c[i]] == 0)
      coll[c[i]] = r[i];
    else
      coll[c[i]] = max(coll[c[i]], r[i]);
    if (updf[r[i] + c[i]] == 0)
      updf[r[i] + c[i]] = c[i];
    else
      updf[r[i] + c[i]] = min(updf[r[i] + c[i]], c[i]);
    if (updl[r[i] + c[i]] == 0)
      updl[r[i] + c[i]] = c[i];
    else
      updl[r[i] + c[i]] = max(updl[r[i] + c[i]], c[i]);
    if (downdf[r[i] - c[i] + 100001] == 0)
      downdf[r[i] - c[i] + 100001] = c[i];
    else
      downdf[r[i] - c[i] + 100001] = min(downdf[r[i] - c[i] + 100001], c[i]);
    if (downdl[r[i] - c[i] + 100001] == 0)
      downdl[r[i] - c[i] + 100001] = c[i];
    else
      downdl[r[i] - c[i] + 100001] = max(downdl[r[i] - c[i] + 100001], c[i]);
  }
  for (int i = 0; i < m; ++i) {
    int ct = 0;
    if (rowf[r[i]] != c[i]) ct++;
    if (rowl[r[i]] != c[i]) ct++;
    if (colf[c[i]] != r[i]) ct++;
    if (coll[c[i]] != r[i]) ct++;
    if (updf[r[i] + c[i]] != c[i]) ct++;
    if (updl[r[i] + c[i]] != c[i]) ct++;
    if (downdf[r[i] - c[i] + 100001] != c[i]) ct++;
    if (downdl[r[i] - c[i] + 100001] != c[i]) ct++;
    t[ct]++;
  }
  cout << t[0];
  for (int i = 1; i < 9; i++) {
    cout << " " << t[i];
  }
  cout << endl;
}
