#include <bits/stdc++.h>
using namespace std;
int const N = 200001;
int n, m, an[9];
pair<int, int> v[N];
vector<int> r[N], c[N];
map<int, vector<int>> sm, df;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    scanf("%d%d", &v[i].first, &v[i].second);
    r[v[i].first].push_back(v[i].second);
    c[v[i].second].push_back(v[i].first);
    sm[v[i].first + v[i].second].push_back(v[i].first);
    df[v[i].first - v[i].second].push_back(v[i].first);
  }
  for (int i = 0; i < N; ++i)
    sort(r[i].begin(), r[i].end()), sort(c[i].begin(), c[i].end());
  for (auto &i : df) sort(i.second.begin(), i.second.end());
  for (auto &i : sm) sort(i.second.begin(), i.second.end());
  for (int i = 0; i < m; ++i) {
    int w = 0, x = v[i].first, y = v[i].second;
    if (r[x].size() > 1 && r[x].back() > y) ++w;
    if (r[x].size() > 1 && r[x][0] < y) ++w;
    if (c[y].size() > 1 && c[y].back() > x) ++w;
    if (c[y].size() > 1 && c[y][0] < x) ++w;
    if (sm[x + y].size() > 1) {
      if (sm[x + y][0] < x) ++w;
      if (sm[x + y].back() > x) ++w;
    }
    if (df[x - y].size() > 1) {
      if (df[x - y][0] < x) ++w;
      if (df[x - y].back() > x) ++w;
    }
    an[w]++;
  }
  for (int i = 0; i < 9; ++i) printf("%d ", an[i]);
}
