#include <bits/stdc++.h>
using namespace std;
int n, m, t1, t2;
const int M = 100500;
int a[4][2 * M][2][2] = {0};
int counter[M] = {0};
int t[9] = {0};
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d %d", &t1, &t2);
    if (a[0][t1][0][0] == 0 || a[0][t1][0][1] > t2) {
      a[0][t1][0][0] = i;
      a[0][t1][0][1] = t2;
    }
    if (a[0][t1][1][0] == 0 || a[0][t1][1][1] < t2) {
      a[0][t1][1][0] = i;
      a[0][t1][1][1] = t2;
    }
    if (a[1][t2][0][0] == 0 || a[1][t2][0][1] > t1) {
      a[1][t2][0][0] = i;
      a[1][t2][0][1] = t1;
    }
    if (a[1][t2][1][0] == 0 || a[1][t2][1][1] < t1) {
      a[1][t2][1][0] = i;
      a[1][t2][1][1] = t1;
    }
    if (a[2][t1 - t2 + M][0][0] == 0 || a[2][t1 - t2 + M][0][1] > t1) {
      a[2][t1 - t2 + M][0][0] = i;
      a[2][t1 - t2 + M][0][1] = t1;
    }
    if (a[2][t1 - t2 + M][1][0] == 0 || a[2][t1 - t2 + M][1][1] < t1) {
      a[2][t1 - t2 + M][1][0] = i;
      a[2][t1 - t2 + M][1][1] = t1;
    }
    if (a[3][t1 + t2][0][0] == 0 || a[3][t1 + t2][0][1] > t1) {
      a[3][t1 + t2][0][0] = i;
      a[3][t1 + t2][0][1] = t1;
    }
    if (a[3][t1 + t2][1][0] == 0 || a[3][t1 + t2][1][1] < t1) {
      a[3][t1 + t2][1][0] = i;
      a[3][t1 + t2][1][1] = t1;
    }
  }
  for (int i = 0; i <= 3; i++) {
    for (int j = 0; j <= 2 * M - 1; j++) {
      for (int k = 0; k <= 1; k++) {
        if (a[i][j][k][0] != 0) {
          counter[a[i][j][k][0]]++;
        }
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    t[8 - counter[i]]++;
  }
  for (int i = 0; i <= 8; i++) {
    cout << t[i] << " ";
  }
  return 0;
}
