#include <bits/stdc++.h>
using namespace std;
const int MAXn = 1e5 + 10;
vector<pair<int, int> > r[MAXn], c[MAXn], d1[MAXn * 2], d2[MAXn * 2], q;
int n, m, t[10];
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    r[x].push_back(pair<int, int>(x, y));
    c[y].push_back(pair<int, int>(x, y));
    d1[x + y].push_back(pair<int, int>(x, y));
    d2[x + (n - y + 1)].push_back(pair<int, int>(x, y));
    q.push_back(pair<int, int>(x, y));
  }
  for (int i = 0; i < MAXn; i++) {
    sort(r[i].begin(), r[i].end());
    sort(c[i].begin(), c[i].end());
    sort(d1[i].begin(), d1[i].end());
    sort(d2[i].begin(), d2[i].end());
  }
  for (int i = MAXn; i < 2 * MAXn; i++) {
    sort(d1[i].begin(), d1[i].end());
    sort(d2[i].begin(), d2[i].end());
  }
  for (int i = 0; i < m; i++) {
    int hp = 0;
    int x = q[i].first, y = q[i].second;
    int tmp = lower_bound(r[x].begin(), r[x].end(), pair<int, int>(x, y)) -
              r[x].begin();
    if (tmp != 0) hp++;
    if (tmp != (int)r[x].size() - 1) hp++;
    tmp = lower_bound(c[y].begin(), c[y].end(), pair<int, int>(x, y)) -
          c[y].begin();
    if (tmp != 0) hp++;
    if (tmp != (int)c[y].size() - 1) hp++;
    tmp =
        lower_bound(d1[x + y].begin(), d1[x + y].end(), pair<int, int>(x, y)) -
        d1[x + y].begin();
    if (tmp != 0) hp++;
    if (tmp != (int)d1[x + y].size() - 1) hp++;
    tmp = lower_bound(d2[x + (n - y + 1)].begin(), d2[x + (n - y + 1)].end(),
                      pair<int, int>(x, y)) -
          d2[x + (n - y + 1)].begin();
    if (tmp != 0) hp++;
    if (tmp != (int)d2[x + (n - y + 1)].size() - 1) hp++;
    t[hp]++;
  }
  for (int i = 0; i <= 8; i++) cout << t[i] << ' ';
}
