#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long po(long long x, long long n) {
  long long ans = 1;
  while (n > 0) {
    if (n & 1) ans = (ans * x);
    x = (x * x);
    n /= 2;
  }
  return ans;
}
map<pair<long long, long long>, long long> cnt;
long long n, m;
void f(vector<pair<long long, pair<long long, long long> > > a) {
  for (int i = 1; i < m; i++) {
    if (a[i].first == a[i - 1].first) {
      cnt[a[i].second]++;
      cnt[a[i - 1].second]++;
    }
  }
}
void func() {
  cin >> n >> m;
  vector<pair<long long, pair<long long, long long> > > a(m);
  for (int i = 0; i < m; i++) cin >> a[i].second.first >> a[i].second.second;
  for (int i = 0; i < m; i++) a[i].first = a[i].second.first;
  sort(a.begin(), a.end());
  f(a);
  for (int i = 0; i < m; i++) a[i].first = a[i].second.second;
  sort(a.begin(), a.end());
  f(a);
  for (int i = 0; i < m; i++)
    a[i].first = a[i].second.first + a[i].second.second;
  sort(a.begin(), a.end());
  f(a);
  for (int i = 0; i < m; i++)
    a[i].first = a[i].second.second - a[i].second.first;
  sort(a.begin(), a.end());
  f(a);
  long long ans[9] = {0};
  long long c = 0;
  for (auto i = cnt.begin(); i != cnt.end(); i++) ans[i->second]++;
  for (int i = 1; i < 9; i++) c += ans[i];
  ans[0] = m - c;
  for (int i = 0; i < 9; i++) cout << ans[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) func();
}
