#include <bits/stdc++.h>
using namespace std;
set<int> s1[300000], s2[300000], s3[300000], s4[300000];
int n, m, t[10];
pair<int, int> a[300000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    s1[x].insert(y);
    s2[y].insert(x);
    s3[x + y].insert(x);
    s4[x - y + 100000].insert(x);
    a[i].first = x;
    a[i].second = y;
  }
  for (int i = 0; i < m; i++) {
    int x = a[i].first;
    int y = a[i].second;
    int k = 0;
    if (x != *s2[y].begin()) k++;
    if (x != *s2[y].rbegin()) k++;
    if (y != *s1[x].begin()) k++;
    if (y != *s1[x].rbegin()) k++;
    if (x != *s3[x + y].begin()) k++;
    if (x != *s3[x + y].rbegin()) k++;
    if (x != *s4[x - y + 100000].begin()) k++;
    if (x != *s4[x - y + 100000].rbegin()) k++;
    t[k]++;
  }
  for (int i = 0; i <= 8; i++) cout << t[i] << " ";
}
