#include <bits/stdc++.h>
using namespace std;
const int MAXN = 250000;
const int INF = 0x7FFFFFFF;
const double eps = 1e-10;
const double pi = acos(-1.0);
struct data {
  int x, y, id;
};
int ret[MAXN], tot[10];
int n, m;
data a[MAXN];
vector<data> g[MAXN];
bool cmp(const data &a, const data &b) {
  return a.x < b.x || a.x == b.x && a.y < b.y;
}
void init() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) scanf("%d%d", &a[i].x, &a[i].y);
  for (int i = 0; i < m; i++) a[i].id = i;
  sort(a, a + m, cmp);
}
void calc() {
  for (int i = 0; i <= n + n; i++)
    if (g[i].size() > 1) {
      ++ret[g[i][0].id];
      ++ret[g[i][g[i].size() - 1].id];
      for (int j = 1; j < g[i].size() - 1; j++) ret[g[i][j].id] += 2;
    }
  for (int i = 0; i <= n + n; i++) g[i].clear();
}
void solve() {
  memset(ret, 0, sizeof(ret));
  for (int i = 0; i <= n + n; i++) g[i].clear();
  for (int i = 0; i < m; i++) g[a[i].x - a[i].y + n].push_back(a[i]);
  calc();
  for (int i = 0; i < m; i++) g[a[i].x + a[i].y].push_back(a[i]);
  calc();
  for (int i = 0; i < m; i++) g[a[i].x].push_back(a[i]);
  calc();
  for (int i = 0; i < m; i++) g[a[i].y].push_back(a[i]);
  calc();
  memset(tot, 0, sizeof(tot));
  for (int i = 0; i < m; i++) ++tot[ret[i]];
  for (int i = 0; i <= 8; i++) {
    if (i > 0) cout << ' ';
    cout << tot[i];
  }
  cout << endl;
}
int main() {
  init();
  solve();
  return 0;
}
