#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 10;
int id[N], n, m, num[N], ans[10];
struct point {
  int x, y;
} a[N];
void init() {
  for (int i = 1; i <= m; i++) id[i] = i;
}
bool cmp1(int i, int j) {
  if (a[i].x == a[j].x) return a[i].y < a[j].y;
  return a[i].x < a[j].x;
}
bool cmp2(int i, int j) {
  if (a[i].y == a[j].y) return a[i].x < a[j].x;
  return a[i].y < a[j].y;
}
bool cmp3(int i, int j) {
  if ((a[i].x - a[i].y) == (a[j].x - a[j].y))
    return (a[i].x + a[i].y) < (a[j].x + a[j].y);
  return (a[i].x - a[i].y) < (a[j].x - a[j].y);
}
bool cmp4(int i, int j) {
  if ((a[i].x + a[i].y) == (a[j].x + a[j].y))
    return (a[i].x - a[i].y) < (a[j].x - a[j].y);
  return (a[i].x + a[i].y) < (a[j].x + a[j].y);
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d %d", &a[i].x, &a[i].y);
  }
  init();
  sort(id + 1, id + 1 + m, cmp1);
  int flag = 0;
  for (int i = 1; i < m; i++) {
    if (!flag && a[id[i]].x == a[id[i + 1]].x) {
      num[id[i]]++;
      flag = 1;
    } else if (flag && a[id[i]].x == a[id[i + 1]].x)
      num[id[i]] += 2;
    else if (flag && a[id[i]].x != a[id[i + 1]].x) {
      num[id[i]]++;
      flag = 0;
    }
  }
  if (a[id[m]].x == a[id[m - 1]].x && m != 1) num[id[m]]++;
  init();
  sort(id + 1, id + 1 + m, cmp2);
  flag = 0;
  for (int i = 1; i < m; i++) {
    if (!flag && a[id[i]].y == a[id[i + 1]].y) {
      num[id[i]]++;
      flag = 1;
    } else if (flag && a[id[i]].y == a[id[i + 1]].y)
      num[id[i]] += 2;
    else if (flag && a[id[i]].y != a[id[i + 1]].y) {
      num[id[i]]++;
      flag = 0;
    }
  }
  if (a[id[m]].y == a[id[m - 1]].y && m != 1) num[id[m]]++;
  init();
  sort(id + 1, id + 1 + m, cmp3);
  flag = 0;
  for (int i = 1; i < m; i++) {
    if (!flag &&
        (a[id[i]].x - a[id[i]].y) == (a[id[i + 1]].x - a[id[i + 1]].y)) {
      num[id[i]]++;
      flag = 1;
    } else if (flag &&
               (a[id[i]].x - a[id[i]].y) == (a[id[i + 1]].x - a[id[i + 1]].y))
      num[id[i]] += 2;
    else if (flag &&
             (a[id[i]].x - a[id[i]].y) != (a[id[i + 1]].x - a[id[i + 1]].y)) {
      num[id[i]]++;
      flag = 0;
    }
  }
  if ((a[id[m]].x - a[id[m]].y) == (a[id[m - 1]].x - a[id[m + -1]].y) && m != 1)
    num[id[m]]++;
  init();
  sort(id + 1, id + 1 + m, cmp4);
  flag = 0;
  for (int i = 1; i < m; i++) {
    if (!flag &&
        (a[id[i]].x + a[id[i]].y) == (a[id[i + 1]].x + a[id[i + 1]].y)) {
      num[id[i]]++;
      flag = 1;
    } else if (flag &&
               (a[id[i]].x + a[id[i]].y) == (a[id[i + 1]].x + a[id[i + 1]].y))
      num[id[i]] += 2;
    else if (flag &&
             (a[id[i]].x + a[id[i]].y) != (a[id[i + 1]].x + a[id[i + 1]].y)) {
      num[id[i]]++;
      flag = 0;
    }
  }
  if ((a[id[m]].x + a[id[m]].y) == (a[id[m - 1]].x + a[id[m - 1]].y) && m != 1)
    num[id[m]]++;
  for (int i = 1; i <= m; i++) {
    ans[num[id[i]]]++;
  }
  int is_od;
  for (int i = 0; i <= 8; i++) printf("%d ", ans[i]);
  return 0;
}
