#include <bits/stdc++.h>
using namespace std;
int n, m, ans[9];
struct tmp {
  int x, y, num;
} a[100001];
bool tmp1(tmp a, tmp b) {
  if (a.y < b.y) return true;
  if (a.y > b.y) return false;
  return a.x < b.x;
}
bool tmp2(tmp a, tmp b) {
  if (a.x < b.x) return true;
  if (a.x > b.x) return false;
  return a.y < b.y;
}
bool tmp3(tmp a, tmp b) {
  if (a.x + a.y < b.x + b.y) return true;
  if (a.x + a.y > b.x + b.y) return false;
  return a.x < b.x;
}
bool tmp4(tmp a, tmp b) {
  if (a.x - a.y < b.x - b.y) return true;
  if (a.x - a.y > b.x - b.y) return false;
  return a.x < b.x;
}
int main() {
  cin >> n >> m;
  memset(a, 0, sizeof(a));
  memset(ans, 0, sizeof(ans));
  for (int i = 1; i <= m; i++) scanf("%d%d", &a[i].x, &a[i].y);
  sort(a + 1, a + 1 + m, tmp1);
  int p = 1;
  while (p <= m) {
    while (p < m && a[p].y == a[p + 1].y) {
      a[p].num++;
      p++;
      a[p].num++;
    }
    p++;
  }
  sort(a + 1, a + 1 + m, tmp2);
  p = 1;
  while (p <= m) {
    while (p < m && a[p].x == a[p + 1].x) {
      a[p].num++;
      p++;
      a[p].num++;
    }
    p++;
  }
  sort(a + 1, a + 1 + m, tmp3);
  p = 1;
  while (p <= m) {
    while (p < m && a[p].x + a[p].y == a[p + 1].x + a[p + 1].y) {
      a[p].num++;
      p++;
      a[p].num++;
    }
    p++;
  }
  sort(a + 1, a + 1 + m, tmp4);
  p = 1;
  while (p <= m) {
    while (p < m && a[p].x - a[p].y == a[p + 1].x - a[p + 1].y) {
      a[p].num++;
      p++;
      a[p].num++;
    }
    p++;
  }
  for (int i = 1; i <= m; i++) ans[a[i].num]++;
  for (int i = 0; i < 8; i++) cout << ans[i] << ' ';
  cout << ans[8] << endl;
  return 0;
}
