#include <bits/stdc++.h>
using namespace std;
map<int, vector<pair<int, int> > > row, col, diag, r_diag;
int t[9];
int count(const vector<pair<int, int> > &v, pair<int, int> p) {
  int targets = 0;
  auto it = upper_bound(v.begin(), v.end(), p);
  if (it != v.end()) {
    targets++;
  }
  auto it2 = lower_bound(v.begin(), v.end(), p);
  if (it2 != v.begin()) {
    targets++;
  }
  return targets;
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  vector<pair<int, int> > all;
  for (int i = int(0); i < int(m); i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    all.emplace_back(x, y);
  }
  sort(all.begin(), all.end());
  for (auto &each : all) {
    int x, y;
    tie(x, y) = each;
    row[x].emplace_back(x, y);
    col[y].emplace_back(x, y);
    diag[x - y].emplace_back(x, y);
    r_diag[x + y].emplace_back(x, y);
  }
  for (auto &each : all) {
    int x, y;
    tie(x, y) = each;
    int w = 0;
    w += count(row[x], each);
    w += count(col[y], each);
    w += count(diag[x - y], each);
    w += count(r_diag[x + y], each);
    t[w]++;
  }
  for (int i = int(0); i < int(9); i++) {
    printf("%d ", t[i]);
  }
  puts("");
  return 0;
}
