#include <bits/stdc++.h>
using namespace std;
map<long long, pair<long long, long long> > lx;
map<long long, pair<long long, long long> > rx;
map<long long, pair<long long, long long> > ly;
map<long long, pair<long long, long long> > ry;
map<long long, pair<long long, long long> > vx;
map<long long, pair<long long, long long> > vy;
map<long long, pair<long long, long long> > xx;
map<long long, pair<long long, long long> > xy;
int32_t main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> v(9, 0);
  vector<pair<long long, long long> > r;
  for (long long i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    if (lx.count(x)) {
      lx[x] = min(lx[x], pair<long long, long long>(x, y));
    } else
      lx[x] = pair<long long, long long>(x, y);
    if (rx.count(x)) {
      rx[x] = max(rx[x], pair<long long, long long>(x, y));
    } else
      rx[x] = pair<long long, long long>(x, y);
    if (ly.count(y)) {
      ly[y] = min(ly[y], pair<long long, long long>(x, y));
    } else
      ly[y] = pair<long long, long long>(x, y);
    if (ry.count(y)) {
      ry[y] = max(ry[y], pair<long long, long long>(x, y));
    } else
      ry[y] = pair<long long, long long>(x, y);
    if (vx.count(x - y)) {
      vx[x - y] = min(vx[x - y], pair<long long, long long>(x, y));
    } else
      vx[x - y] = pair<long long, long long>(x, y);
    if (vy.count(x - y)) {
      vy[x - y] = max(vy[x - y], pair<long long, long long>(x, y));
    } else
      vy[x - y] = pair<long long, long long>(x, y);
    if (xx.count(x + y)) {
      xx[x + y] = min(xx[x + y], pair<long long, long long>(x, y));
    } else
      xx[x + y] = pair<long long, long long>(x, y);
    if (xy.count(x + y)) {
      xy[x + y] = max(xy[x + y], pair<long long, long long>(x, y));
    } else
      xy[x + y] = pair<long long, long long>(x, y);
    r.push_back(pair<long long, long long>(x, y));
  }
  for (auto w : r) {
    long long ans = 0;
    long long x = w.first, y = w.second;
    if (lx.count(x)) {
      if (lx[x] < w) {
        ans++;
      }
    }
    if (rx.count(x)) {
      if (rx[x] > w) ans++;
    }
    if (ly.count(y)) {
      if (ly[y] < w) ans++;
    }
    if (ry.count(y)) {
      if (ry[y] > w) ans++;
    }
    if (vx.count(x - y)) {
      if (vx[x - y] < w) ans++;
    }
    if (vy.count(x - y)) {
      if (vy[x - y] > w) ans++;
    }
    if (xx.count(x + y)) {
      if (xx[x + y] < w) ans++;
    }
    if (xy.count(x + y)) {
      if (xy[x + y] > w) ans++;
    }
    v[ans]++;
  }
  for (long long i = 0; i <= 8; i++) cout << v[i] << " ";
}
