#include <bits/stdc++.h>
using namespace std;
long long powm(long long base, long long exp, long long mod = 1000000007) {
  long long ans = 1;
  while (exp) {
    if (exp & 1) ans = (ans * base) % mod;
    exp >>= 1, base = (base * base) % mod;
  }
  return ans;
}
long long addm(long long a, long long b) {
  long long tmp = a + b;
  if (tmp > 1000000007) tmp -= 1000000007;
  return tmp;
}
vector<pair<long long, long long> > q;
set<pair<long long, long long> > row[200005];
set<pair<long long, long long> > col[200005];
set<pair<long long, long long> > ldia[200005];
set<pair<long long, long long> > rdia[200005];
long long ans[100005];
long long final[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  long long i, j, k, t, m, n, res = 0, r, c;
  cin >> n >> m;
  for (long long i = 1; i < m + 1; i++) {
    cin >> r >> c;
    q.push_back(make_pair(r, c));
    row[r].insert(make_pair(c, i));
    col[c].insert(make_pair(r, i));
    ldia[r + c].insert(make_pair(r, i));
    rdia[n + r - c].insert(make_pair(r, i));
  }
  for (long long i = 1; i < n + 1; i++) {
    t = 0;
    if (row[i].size() >= 2)
      for (auto &value : row[i]) {
        if (t == 0) {
          t = 1;
          ans[value.second]++;
        } else {
          t = 1;
          ans[value.second] += 2;
        }
      }
    if (row[i].size() >= 2) {
      ans[row[i].rbegin()->second]--;
    }
    t = 0;
    if (col[i].size() >= 2)
      for (auto &value : col[i]) {
        if (t == 0) {
          t = 1;
          ans[value.second]++;
        } else {
          t = 1;
          ans[value.second] += 2;
        }
      }
    if (col[i].size() >= 2) {
      ans[col[i].rbegin()->second]--;
    }
  }
  for (long long i = 2; i < 2 * n + 1; i++) {
    t = 0;
    if (ldia[i].size() >= 2)
      for (auto &value : ldia[i]) {
        if (t == 0) {
          t = 1;
          ans[value.second]++;
        } else {
          t = 1;
          ans[value.second] += 2;
        }
      }
    if (ldia[i].size() >= 2) {
      ans[ldia[i].rbegin()->second]--;
    }
  }
  for (long long i = 1; i < 2 * n; i++) {
    t = 0;
    if (rdia[i].size() >= 2)
      for (auto &value : rdia[i]) {
        if (t == 0) {
          t = 1;
          ans[value.second]++;
        } else {
          t = 1;
          ans[value.second] += 2;
        }
      }
    if (rdia[i].size() >= 2) {
      ans[rdia[i].rbegin()->second]--;
    }
  }
  for (long long i = 1; i < m + 1; i++) {
    final[ans[i]]++;
  }
  for (long long i = 0; i < 9; i++) {
    cout << final[i] << '\n';
  }
  return 0;
}
