#include <bits/stdc++.h>
using namespace std;
const int maxn = 222222;
pair<pair<int, int>, int> P[maxn];
int n, m;
int ans[maxn];
vector<int> buf;
void get() {
  scanf("%d%d", &n, &m);
  int i;
  for (i = 0; i < m; ++i) {
    scanf("%d%d", &P[i].first.first, &P[i].first.second);
    P[i].second = i;
  }
}
void gao() {
  int i, j;
  for (i = 0; i < m; ++i) {
    buf.clear();
    for (j = i; j < m && P[j].first.first == P[i].first.first; ++j) {
      buf.push_back(P[j].second);
    }
    i = j - 1;
    if (buf.size() > 1) {
      for (j = 0; j < buf.size(); ++j)
        ans[buf[j]] += ((j == 0 || j == buf.size() - 1) ? 1 : 2);
    }
  }
}
int ct[11];
int XX[maxn], YY[maxn];
void work() {
  int i;
  sort(P, P + m);
  gao();
  for (i = 0; i < m; ++i) swap(P[i].first.first, P[i].first.second);
  sort(P, P + m);
  gao();
  for (i = 0; i < m; ++i) swap(P[i].first.first, P[i].first.second);
  for (i = 0; i < m; ++i) {
    int x, y;
    x = P[i].first.first;
    y = P[i].first.second;
    P[i].first = make_pair(-y + x, y + x);
  }
  sort(P, P + m);
  gao();
  for (i = 0; i < m; ++i) {
    int x, y;
    x = P[i].first.first;
    y = P[i].first.second;
    P[i].first = make_pair(-y, x);
  }
  sort(P, P + m);
  gao();
  for (i = 0; i < m; ++i) ++ct[ans[i]];
  for (i = 0; i < 8; ++i) cout << ct[i] << ' ';
  cout << ct[i] << endl;
}
int main() {
  get();
  work();
  return 0;
}
