#include <bits/stdc++.h>
using namespace std;
template <class T>
void dbs(string str, T t) {
  cerr << str << " : " << t << "\n";
}
template <class T, class... S>
void dbs(string str, T t, S... s) {
  int idx = str.find(',');
  cerr << str.substr(0, idx) << " : " << t << ",";
  dbs(str.substr(idx + 1), s...);
}
const int MAX_N = (int)2e5 + 10;
const int OFFSET = (int)1e5 + 5;
set<int> row[MAX_N], col[MAX_N], diff[MAX_N], add[MAX_N];
pair<int, int> p[MAX_N];
inline bool isLarger(set<int>& s, int val) {
  return s.upper_bound(val) != s.end();
}
inline bool isSmaller(set<int>& s, int val) {
  return s.lower_bound(val) != s.begin();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    --x, --y;
    row[x].insert(y);
    col[y].insert(x);
    add[x + y].insert(x);
    diff[x - y + OFFSET].insert(x);
    p[i] = make_pair(x, y);
  }
  int cnt[9];
  fill(cnt, cnt + 9, 0);
  for (int i = 0; i < m; ++i) {
    int x = p[i].first, y = p[i].second;
    int kill = 0;
    if (isSmaller(row[x], y)) ++kill;
    if (isLarger(row[x], y)) ++kill;
    if (isSmaller(col[y], x)) ++kill;
    if (isLarger(col[y], x)) ++kill;
    if (isSmaller(add[x + y], x)) ++kill;
    if (isLarger(add[x + y], x)) ++kill;
    if (isSmaller(diff[x - y + OFFSET], x)) ++kill;
    if (isLarger(diff[x - y + OFFSET], x)) ++kill;
    ++cnt[kill];
  }
  for (int i = 0; i <= 8; ++i) cout << cnt[i] << " ";
  cout << "\n";
  return 0;
}
