#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 123;
const int inf = 1e9 + 1;
const int mod = 1e9 + 7;
const long long infl = 3e18 + 1;
const double pi = acos(-1.0);
inline void boost() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
inline void SmartRandom228() {
  unsigned int key;
  asm("rdtsc" : "=A"(key));
  srand(key);
}
int n, m, x[N], y[N];
set<int> stx[N], sty[N];
map<int, set<int> > d1, d2;
vector<int> ans;
int main() {
  boost();
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> x[i] >> y[i];
    stx[x[i]].insert(y[i]);
    sty[y[i]].insert(x[i]);
    d1[x[i] + y[i]].insert(x[i]);
    d2[x[i] - y[i]].insert(x[i]);
  }
  ans.resize(9);
  for (int i = 1; i <= m; i++) {
    int cnt = 0, cur;
    cur = *stx[x[i]].lower_bound(y[i]);
    if (cur > *stx[x[i]].begin()) cnt++;
    if (cur < *stx[x[i]].rbegin()) cnt++;
    cur = *sty[y[i]].lower_bound(x[i]);
    if (cur > *sty[y[i]].begin()) cnt++;
    if (cur < *sty[y[i]].rbegin()) cnt++;
    cur = *d1[x[i] + y[i]].lower_bound(x[i]);
    if (cur > *d1[x[i] + y[i]].begin()) cnt++;
    if (cur < *d1[x[i] + y[i]].rbegin()) cnt++;
    cur = *d2[x[i] - y[i]].lower_bound(x[i]);
    if (cur > *d2[x[i] - y[i]].begin()) cnt++;
    if (cur < *d2[x[i] - y[i]].rbegin()) cnt++;
    ans[cnt]++;
  }
  for (int i = 0; i < 9; i++) cout << ans[i] << ' ';
  return 0;
}
