#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y, pos;
} p;
int n, m, br[100002], t[10];
vector<point> v1, v2, v3, v4;
bool cmph(point p1, point p2) {
  if (p1.x != p2.x) return p1.x < p2.x;
  return p1.y < p2.y;
}
bool cmpv(point p1, point p2) {
  if (p1.y != p2.y) return p1.y < p2.y;
  return p1.x < p2.x;
}
bool cmpd1(point p1, point p2) {
  if (p1.x + p1.y != p2.x + p2.y)
    return p1.x + p1.y < p2.x + p2.y;
  else
    return p1.x < p2.x;
}
bool cmpd2(point p1, point p2) {
  if (p1.x - p1.y != p2.x - p2.y)
    return p1.x - p1.y < p2.x - p2.y;
  else
    return p1.x < p2.x;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> p.x >> p.y;
    p.pos = i;
    v1.push_back(p);
    v2.push_back(p);
    v3.push_back(p);
    v4.push_back(p);
  }
  sort(v1.begin(), v1.end(), cmph);
  sort(v2.begin(), v2.end(), cmpv);
  sort(v3.begin(), v3.end(), cmpd1);
  sort(v4.begin(), v4.end(), cmpd2);
  for (int i = 0; i < v1.size(); i++) {
    if (i > 0 && v1[i].x == v1[i - 1].x) {
      br[v1[i].pos]++;
    }
    if (i + 1 < v1.size() && v1[i].x == v1[i + 1].x) {
      br[v1[i].pos]++;
    }
  }
  for (int i = 0; i < v2.size(); i++) {
    if (i > 0 && v2[i].y == v2[i - 1].y) {
      br[v2[i].pos]++;
    }
    if (i + 1 < v2.size() && v2[i].y == v2[i + 1].y) {
      br[v2[i].pos]++;
    }
  }
  for (int i = 0; i < v3.size(); i++) {
    if (i > 0 && v3[i].x + v3[i].y == v3[i - 1].x + v3[i - 1].y) {
      br[v3[i].pos]++;
    }
    if (i + 1 < v3.size() && v3[i].y + v3[i].x == v3[i + 1].y + v3[i + 1].x) {
      br[v3[i].pos]++;
    }
  }
  for (int i = 0; i < v4.size(); i++) {
    if (i > 0 && v4[i].x - v4[i].y == v4[i - 1].x - v4[i - 1].y) {
      br[v4[i].pos]++;
    }
    if (i + 1 < v4.size() && v4[i].y - v4[i].x == v4[i + 1].y - v4[i + 1].x) {
      br[v4[i].pos]++;
    }
  }
  for (int i = 0; i < m; i++) {
    t[br[i]]++;
  }
  for (int i = 0; i <= 8; i++) {
    cout << t[i] << " ";
  }
  cout << endl;
  return 0;
}
