#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int cnt[9];
int a[N][2];
vector<int> r[N];
vector<int> c[N];
vector<int> rd[2 * N];
vector<int> ld[2 * N];
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    int x, y;
    scanf("%d %d", &x, &y);
    a[i][0] = x, a[i][1] = y;
    r[x].push_back(y);
    c[y].push_back(x);
    rd[x + y - 1].push_back(y - x);
    ld[x - y + n].push_back(y + x);
  }
  for (int i = 1; i <= n; ++i) {
    sort(r[i].begin(), r[i].end());
    sort(c[i].begin(), c[i].end());
  }
  for (int i = 1; i < 2 * n; ++i) {
    sort(rd[i].begin(), rd[i].end());
    sort(ld[i].begin(), ld[i].end());
  }
  for (int i = 1; i <= m; ++i) {
    int res = 0;
    int x = a[i][0], y = a[i][1];
    int pos = lower_bound(r[x].begin(), r[x].end(), y) - r[x].begin();
    if (pos > 0) {
      res++;
    }
    if (pos + 1 < r[x].size()) {
      res++;
    }
    pos = lower_bound(c[y].begin(), c[y].end(), x) - c[y].begin();
    if (pos > 0) {
      res++;
    }
    if (pos + 1 < c[y].size()) {
      res++;
    }
    pos = lower_bound(rd[x + y - 1].begin(), rd[x + y - 1].end(), y - x) -
          rd[x + y - 1].begin();
    if (pos > 0) {
      res++;
    }
    if (pos + 1 < rd[x + y - 1].size()) {
      res++;
    }
    pos = lower_bound(ld[x - y + n].begin(), ld[x - y + n].end(), y + x) -
          ld[x - y + n].begin();
    if (pos > 0) {
      res++;
    }
    if (pos + 1 < ld[x - y + n].size()) {
      res++;
    }
    cnt[res]++;
  }
  for (int i = 0; i <= 8; ++i) {
    printf("%d ", cnt[i]);
  }
}
