#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int n, m;
int a[MAXN];
set<pair<int, int> > board[4][MAXN * 2];
int sol[9];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int r, c;
    scanf("%d%d", &r, &c);
    r--;
    c--;
    board[0][r].insert(pair<int, int>(c, i));
    board[1][c].insert(pair<int, int>(r, i));
    board[2][r + c].insert(pair<int, int>(r - c + n - 1, i));
    board[3][r - c + n - 1].insert(pair<int, int>(r + c, i));
  }
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < n * 2; ++j) {
      if (board[i][j].size() >= 2) {
        for (auto k : board[i][j]) {
          a[k.second] += 2;
        }
        a[board[i][j].begin()->second]--;
        a[board[i][j].rbegin()->second]--;
      }
    }
  }
  for (int i = 0; i < m; ++i) {
    sol[a[i]]++;
  }
  for (int i = 0; i < 9; ++i) {
    printf("%d ", sol[i]);
  }
}
