#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long fast_exp(long long a, long long b) {
  if (b <= 0)
    return 1;
  else {
    long long res = 1;
    res = fast_exp(a, b / 2);
    res = (res * res) % mod;
    if (b % 2 == 1) res = (res * a) % mod;
    return res;
  }
}
const long long N = 1e5 + 1;
vector<pair<int, int>> row[N + 1];
vector<pair<int, int>> col[N + 1];
vector<pair<int, int>> diag_sum[2 * N + 1];
vector<pair<int, int>> diag_diff[2 * N + 1];
int queen[N + 1] = {};
void counter(vector<pair<int, int>> &v) {
  int n = v.size();
  for (int i = 0; i < n - 1; i++) {
    queen[v[i].second]++;
    queen[v[i + 1].second]++;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  int r, c;
  for (int i = 0; i < m; i++) {
    cin >> r >> c;
    row[r].push_back({c, i});
    col[c].push_back({r, i});
    diag_diff[r - c + N].push_back({r, i});
    diag_sum[r + c].push_back({r, i});
  }
  for (int i = 0; i <= N; i++) {
    sort(row[i].begin(), row[i].end());
    sort(col[i].begin(), col[i].end());
    counter(row[i]);
    counter(col[i]);
  }
  for (int i = 0; i <= 2 * N; i++) {
    sort(diag_sum[i].begin(), diag_sum[i].end());
    sort(diag_diff[i].begin(), diag_diff[i].end());
    counter(diag_diff[i]);
    counter(diag_sum[i]);
  }
  int q[9] = {};
  for (int i = 0; i < m; i++) q[queen[i]]++;
  for (int i = 0; i < 9; i++) cout << q[i] << ' ';
  cout << '\n';
  return 0;
}
