#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
struct node {
  int x, y;
  void fun(int a, int b) {
    x = a;
    y = b;
  }
} pnt[N], row[N], column[N], adj1[N], adj2[N];
bool vis_row[N], vis_column[N];
int main() {
  int n, m, cnt1 = 0, cnt2 = 0, tmp;
  int ans[10] = {0};
  cin >> n >> m;
  map<int, int> ihash1, ihash2;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    pnt[i].fun(x, y);
    if (!vis_row[x]) {
      vis_row[x] = 1;
      row[x].fun(n + 1, 0);
    }
    row[x].fun(min(row[x].x, y), max(row[x].y, y));
    if (!vis_column[y]) {
      vis_column[y] = 1;
      column[y].fun(n + 1, 0);
    }
    column[y].fun(min(column[y].x, x), max(column[y].y, x));
    if (ihash1.find(x + y) == ihash1.end()) {
      ihash1[x + y] = cnt1++;
      adj1[cnt1 - 1].fun(n + 1, 0);
    }
    tmp = ihash1[x + y];
    adj1[tmp].fun(min(adj1[tmp].x, x), max(adj1[tmp].y, x));
    if (ihash2.find(x - y) == ihash2.end()) {
      ihash2[x - y] = cnt2++;
      adj2[cnt2 - 1].fun(n + 1, 0);
    }
    tmp = ihash2[x - y];
    adj2[tmp].fun(min(adj2[tmp].x, x), max(adj2[tmp].y, x));
  }
  for (int i = 0; i < m; i++) {
    int x = pnt[i].x, y = pnt[i].y, res = 0;
    if (y == row[x].x && y == row[x].y)
      res += 0;
    else if (y == row[x].x || y == row[x].y)
      res += 1;
    else
      res += 2;
    if (x == column[y].x && x == column[y].y)
      res += 0;
    else if (x == column[y].x || x == column[y].y)
      res += 1;
    else
      res += 2;
    tmp = ihash1[x + y];
    if (x == adj1[tmp].x && x == adj1[tmp].y)
      res += 0;
    else if (x == adj1[tmp].x || x == adj1[tmp].y)
      res += 1;
    else
      res += 2;
    tmp = ihash2[x - y];
    if (x == adj2[tmp].x && x == adj2[tmp].y)
      res += 0;
    else if (x == adj2[tmp].x || x == adj2[tmp].y)
      res += 1;
    else
      res += 2;
    ans[res]++;
  }
  for (int i = 0; i <= 8; i++) printf("%d%c", ans[i], i == 8 ? '\n' : ' ');
  return 0;
}
