#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, m, d[10], x[N], y[N], res;
set<int> s[4][250000];
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> x[i] >> y[i];
    s[0][x[i] - 1].insert(y[i] - 1);
    s[1][y[i] - 1].insert(x[i] - 1);
    s[2][x[i] + y[i] - 2].insert(y[i] - 1);
    s[3][n - x[i] + y[i] - 3].insert(y[i] - 1);
  }
  for (int i = 0; i < m; i++) {
    res = 0;
    res += 2 - (*s[0][x[i] - 1].begin() == y[i] - 1) -
           (*(--s[0][x[i] - 1].end()) == y[i] - 1);
    res += 2 - (*s[1][y[i] - 1].begin() == x[i] - 1) -
           (*(--s[1][y[i] - 1].end()) == x[i] - 1);
    res += 2 - (*s[2][x[i] + y[i] - 2].begin() == y[i] - 1) -
           (*(--s[2][x[i] + y[i] - 2].end()) == y[i] - 1);
    res += 2 - (*s[3][n - x[i] + y[i] - 3].begin() == y[i] - 1) -
           (*(--s[3][n - x[i] + y[i] - 3].end()) == y[i] - 1);
    d[res]++;
  }
  for (int i = 0; i <= 8; i++) cout << d[i] << " ";
  return 0;
}
