#include <bits/stdc++.h>
using namespace std;
template <typename S, typename T>
ostream& operator<<(ostream& out, pair<S, T> const& p) {
  out << p.first << " " << p.second;
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> const& v) {
  long long int l = v.size();
  for (long long int i = 0; i < l - 1; i++) out << v[i] << ' ';
  if (l > 0) out << v[l - 1];
  return out;
}
template <typename T>
void trace(const char* name, T&& arg1) {
  cout << name << " : " << arg1 << "\n";
}
template <typename T, typename... Args>
void trace(const char* names, T&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  trace(comma + 1, args...);
}
long long int n, m;
vector<pair<long long int, long long int>> row[100001], col[100000],
    diag1[200005], diag2[200005];
long long int ans[100001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m;
  vector<pair<long long, long long>> q;
  for (long long int i = 0; i < m; i++) {
    long long int r, c;
    cin >> r >> c;
    q.push_back(make_pair(r, c));
    row[r].push_back(make_pair(c, i + 1));
    col[c].push_back(make_pair(r, i + 1));
    diag1[r + c].push_back(make_pair(r, i + 1));
    diag2[n - r + 1 + c].push_back(make_pair(r, i + 1));
  }
  for (long long int i = 0; i <= 100000; i++) {
    sort(row[i].begin(), row[i].end());
    if (row[i].size() > 1) {
      for (long long int j = 0; j < row[i].size(); j++) {
        if (j > 0 && j < row[i].size() - 1)
          ans[row[i][j].second] += 2;
        else
          ans[row[i][j].second]++;
      }
    }
    sort(col[i].begin(), col[i].end());
    if (col[i].size() > 1) {
      for (long long int j = 0; j < col[i].size(); j++) {
        if (j > 0 && j < col[i].size() - 1)
          ans[col[i][j].second] += 2;
        else
          ans[col[i][j].second]++;
      }
    }
  }
  for (long long int i = 0; i <= 200000; i++) {
    sort(diag1[i].begin(), diag1[i].end());
    if (diag1[i].size() > 1) {
      for (long long int j = 0; j < diag1[i].size(); j++) {
        if (j > 0 && j < diag1[i].size() - 1)
          ans[diag1[i][j].second] += 2;
        else
          ans[diag1[i][j].second]++;
      }
    }
    sort(diag2[i].begin(), diag2[i].end());
    if (diag2[i].size() > 1) {
      for (long long int j = 0; j < diag2[i].size(); j++) {
        if (j > 0 && j < diag2[i].size() - 1)
          ans[diag2[i][j].second] += 2;
        else
          ans[diag2[i][j].second]++;
      }
    }
  }
  long long int t[9];
  fill(t, t + 9, 0);
  for (long long int i = 1; i <= m; i++) {
    t[ans[i]]++;
  }
  for (long long int i = 0; i <= 8; i++) cout << t[i] << ' ';
  cout << "\n";
  return 0;
}
