#include <bits/stdc++.h>
using namespace std;
void setIo(string nom) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  freopen((nom + ".in").c_str(), "r", stdin);
  freopen((nom + ".out").c_str(), "w", stdout);
}
struct Reine {
  int x, y, id;
  vector<int> tris;
  int indTri;
  void init(int i) {
    cin >> x >> y;
    id = i;
    tris = {x, y - x, y, -x - y};
  }
  bool operator<(const Reine& autre) const {
    if (indTri != 0)
      return x < autre.x;
    else
      return y < autre.y;
  }
};
const int N = 2e5;
int ans[N], comptes[N];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int cote, nReines;
  cin >> cote >> nReines;
  vector<Reine> reines(nReines);
  map<int, vector<Reine>> idems;
  int ind = 0;
  for (Reine& reine : reines) reine.init(ind++);
  for (int indTri = 0; indTri < 4; ++indTri) {
    for (Reine& reine : reines) {
      reine.indTri = indTri;
      idems[reine.tris[indTri]].push_back(reine);
    }
    for (auto& etage : idems) {
      sort(etage.second.begin(), etage.second.end());
      for (int i = 0; i < (int)etage.second.size(); ++i) {
        ans[etage.second[i].id] +=
            (i != 0) + (i != ((int)etage.second.size() - 1));
      }
    }
    idems.clear();
  }
  for (ind = 0; ind < nReines; ++ind) {
    comptes[ans[ind]]++;
  }
  cout << endl;
  for (int i = 0; i < 9; ++i) cout << comptes[i] << " ";
  cout << endl;
  return 0;
}
