#include <bits/stdc++.h>
using namespace std;
int main() {
  int w, n;
  cin >> w >> n;
  vector<pair<int, int>> a(n);
  vector<vector<pair<int, int>>> b(4);
  for (auto& v : b) v.resize(n);
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    a[i] = {x, y};
    b[0][i] = {x, y};
    b[1][i] = {y, x};
    b[2][i] = {x - y, x + y};
    b[3][i] = {x + y, x - y};
  }
  for (auto& v : b) sort(v.begin(), v.end());
  vector<int> r(9);
  for (int j = 0; j < n; ++j) {
    int c{}, d{}, x{a[j].first}, y{a[j].second};
    for (auto s :
         {pair<int, int>{x, y}, pair<int, int>{y, x},
          pair<int, int>{x - y, x + y}, pair<int, int>{x + y, x - y}}) {
      int i = lower_bound(b[d].begin(), b[d].end(), s) - b[d].begin();
      if (i - 1 >= 0 && b[d][i - 1].first == b[d][i].first) ++c;
      if (i + 1 < n && b[d][i + 1].first == b[d][i].first) ++c;
      ++d;
    }
    ++r[c];
  }
  for (int i = 0; i < 9; ++i) cout << r[i] << " \n"[i == 8];
}
