#include <bits/stdc++.h>
using namespace std;
inline long long bip(long long x, long long n, long long mod) {
  long long res = 1;
  while (n) {
    if (n & 1) {
      res = (res * x) % mod;
    }
    x = (x * x) % mod;
    n >>= 1;
  }
  return res;
}
const int ppr = 257;
const long long INF = 2e18;
const int inf = 2e9;
const int mod = 1e9 + 7;
const int N = 1e6 + 123;
const long double pi = acos(-1.0);
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
int n, m, ans[10], x[N], y[N], a[N], ax[N], ay[N], aa[N];
map<int, int> b, ab;
pair<int, int> p[N];
inline void solve(int X, int Y) {
  int cur = 0;
  x[X]--;
  y[Y]--;
  a[X + Y]--;
  b[X - Y]--;
  if (x[X]) cur++;
  if (y[Y]) cur++;
  if (ax[X] - x[X] - 1) cur++;
  if (ay[Y] - y[Y] - 1) cur++;
  if (a[X + Y]) cur++;
  if (aa[X + Y] - a[X + Y] - 1) cur++;
  if (b[X - Y]) cur++;
  if (ab[X - Y] - b[X - Y] - 1) cur++;
  ans[cur]++;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> p[i].first >> p[i].second;
    x[p[i].first]++;
    y[p[i].second]++;
    a[p[i].first + p[i].second]++;
    b[p[i].first - p[i].second]++;
    ax[p[i].first]++;
    ay[p[i].second]++;
    aa[p[i].first + p[i].second]++;
    ab[p[i].first - p[i].second]++;
  }
  sort(p + 1, p + m + 1);
  for (int i = 1; i <= m; i++) solve(p[i].first, p[i].second);
  for (int i = 0; i < 9; i++) cout << ans[i] << ' ';
  return 0;
}
