#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MAX = 1e5 + 5;
long long arr[MAX], brr[MAX];
bool boole[MAX];
const int N = 100005;
set<pair<int, int> > a[N], b[N], c[N * 2], d[N * 2];
pair<int, int> p[N];
int ans[10];
int calu(const pair<int, int> s, const set<pair<int, int> > &a) {
  int res = 0;
  if (s != (*a.begin())) res++;
  if (a.upper_bound(s) != a.end()) res++;
  return res;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    p[i] = make_pair(x, y);
    a[x].insert(p[i]);
    b[y].insert(p[i]);
    c[x + y].insert(p[i]);
    d[x - y + N].insert(p[i]);
  }
  for (int i = 0; i < m; i++) {
    int x = p[i].first, y = p[i].second, res = 0;
    res += calu(p[i], a[x]);
    res += calu(p[i], b[y]);
    res += calu(p[i], c[x + y]);
    res += calu(p[i], d[x - y + N]);
    ans[res]++;
  }
  for (int i = 0; i <= 8; i++) printf("%d%c", ans[i], i == 8 ? '\n' : ' ');
  return 0;
}
