#include <bits/stdc++.h>
const int inf = (1 << 30) - 1;
const double eps = 1e-9;
using namespace std;
map<int, vector<int> > m1, m2, m3, m4;
vector<int>::iterator it, k;
int n, m, x[100010], y[100010], ans[77] = {0};
map<pair<int, int>, bool> ss;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x[i], &y[i]);
    m1[x[i]].push_back(y[i]);
    m2[y[i]].push_back(x[i]);
    m3[x[i] + y[i] - 1].push_back(x[i]);
    m4[y[i] - x[i]].push_back(x[i]);
  }
  for (int i = 0; i < m; i++) {
    if (!ss[make_pair(1, x[i])]) {
      sort(m1[x[i]].begin(), m1[x[i]].end());
      ss[make_pair(1, x[i])] = true;
    }
    if (!ss[make_pair(2, y[i])]) {
      sort(m2[y[i]].begin(), m2[y[i]].end());
      ss[make_pair(2, y[i])] = true;
    }
    if (!ss[make_pair(3, x[i] + y[i] - 1)]) {
      sort(m3[x[i] + y[i] - 1].begin(), m3[x[i] + y[i] - 1].end());
      ss[make_pair(3, x[i] + y[i] - 1)] = true;
    }
    if (!ss[make_pair(4, y[i] - x[i])]) {
      sort(m4[y[i] - x[i]].begin(), m4[y[i] - x[i]].end());
      ss[make_pair(4, y[i] - x[i])] = true;
    }
  }
  for (int i = 0; i < m; i++) {
    int cnt = 0;
    it = lower_bound(m1[x[i]].begin(), m1[x[i]].end(), y[i]);
    k = --m1[x[i]].end();
    if (it != k && k != m1[x[i]].begin()) cnt++;
    if (it != m1[x[i]].begin()) cnt++;
    it = lower_bound(m2[y[i]].begin(), m2[y[i]].end(), x[i]);
    k = --m2[y[i]].end();
    if (it != k && k != m2[y[i]].begin()) cnt++;
    if (it != m2[y[i]].begin()) cnt++;
    it = lower_bound(m3[x[i] + y[i] - 1].begin(), m3[x[i] + y[i] - 1].end(),
                     x[i]);
    k = --m3[x[i] + y[i] - 1].end();
    if (it != k && k != m3[x[i] + y[i] - 1].begin()) cnt++;
    if (it != m3[x[i] + y[i] - 1].begin()) cnt++;
    it = lower_bound(m4[y[i] - x[i]].begin(), m4[y[i] - x[i]].end(), x[i]);
    k = --m4[y[i] - x[i]].end();
    if (it != k && k != m4[y[i] - x[i]].begin()) cnt++;
    if (it != m4[y[i] - x[i]].begin()) cnt++;
    ans[cnt]++;
  }
  for (int i = 0; i < 9; i++) printf("%d ", ans[i]);
  cout << endl;
  return 0;
}
