#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  T ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T, class X>
inline bool getbit(T a, X i) {
  T t = 1;
  return ((a & (t << i)) > 0);
}
template <class T, class X>
inline T setbit(T a, X i) {
  T t = 1;
  return (a | (t << i));
}
template <class T, class X>
inline T resetbit(T a, X i) {
  T t = 1;
  return (a & (~(t << i)));
}
int n, m;
pair<int, int> arr[100009];
int ob[200009];
pair<pair<int, int>, int> trans[100009];
int cnt[100009];
void solve() {
  memset(ob, 0, sizeof(ob));
  sort(trans + 1, trans + m + 1);
  for (int i = (1); i <= (m); i++) {
    pair<int, int> p = trans[i].first;
    int ind = trans[i].second;
    if (ob[p.second] != 0) {
      cnt[ob[p.second]]++;
      cnt[ind]++;
    }
    ob[p.second] = ind;
  }
}
int ans[9];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = (1); i <= (m); i++)
    scanf("%d %d", &arr[i].first, &arr[i].second);
  for (int i = (1); i <= (m); i++) {
    trans[i].first = arr[i];
    trans[i].second = i;
  }
  solve();
  for (int i = (1); i <= (m); i++) {
    trans[i].first = make_pair(arr[i].second, arr[i].first);
    trans[i].second = i;
  }
  solve();
  for (int i = (1); i <= (m); i++) {
    trans[i].first = make_pair(arr[i].second + arr[i].first - 1,
                               arr[i].second - arr[i].first + n);
    trans[i].second = i;
  }
  solve();
  for (int i = (1); i <= (m); i++) {
    trans[i].first = make_pair(arr[i].second - arr[i].first + n,
                               arr[i].second + arr[i].first - 1);
    trans[i].second = i;
  }
  solve();
  for (int i = (1); i <= (m); i++) ans[cnt[i]]++;
  for (int i = (0); i <= (8); i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
