#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 1;
vector<int> line[4][2 * MAXN];
int x[MAXN], y[MAXN];
int n, m;
int c[MAXN];
int answ[9];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", x + i, y + i);
    line[0][x[i]].push_back(i);
    line[1][y[i]].push_back(i);
    line[2][n + x[i] - y[i]].push_back(i);
    line[3][x[i] + y[i] - 1].push_back(i);
  }
  for (int d = 0; d < 4; d++) {
    int max_t = (d < 2 ? n : 2 * n - 1);
    for (int t = 1; t <= max_t; t++) {
      sort(line[d][t].begin(), line[d][t].end(),
           [&d](int i, int j) { return (d ? (x[i] < x[j]) : (y[i] < y[j])); });
    }
  }
  for (int d = 0; d < 4; d++) {
    int max_t = (d < 2 ? n : 2 * n - 1);
    for (int t = 1; t <= max_t; t++) {
      if (line[d][t].size()) {
        for (int i = 0; i < (int)line[d][t].size(); i++) {
          int j = line[d][t][i];
          c[j] += 2;
          if (!i) c[j]--;
          if (i == (int)line[d][t].size() - 1) c[j]--;
        }
      }
    }
  }
  for (int i = 0; i < m; i++) answ[c[i]]++;
  for (int i = 0; i <= 8; i++) printf("%d ", answ[i]);
  printf("\n");
  return 0;
}
