#include <bits/stdc++.h>
using namespace std;
vector<pair<int, pair<int, int> > > vt1, vt2, vt3, vt4;
vector<int> st1, st2, st3, st4;
vector<int>::iterator it, itt;
int ans[100010];
int ip[100010][2];
int output[9];
int main() {
  int i, n, m;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    ip[i][0] = x;
    ip[i][1] = y;
    vt1.push_back(make_pair(x + y, make_pair(x, y)));
    vt2.push_back(make_pair(x - y, make_pair(x, y)));
    vt3.push_back(make_pair(x, make_pair(x, y)));
    vt4.push_back(make_pair(y, make_pair(x, y)));
  }
  sort(vt1.begin(), vt1.end(),
       [](const pair<int, pair<int, int> >& lhs,
          pair<int, pair<int, int> >& rhs) {
         if (lhs.first != rhs.first)
           return lhs.first < rhs.first;
         else {
           return lhs.second.second < rhs.second.second;
         }
       });
  sort(vt2.begin(), vt2.end(),
       [](const pair<int, pair<int, int> >& lhs,
          const pair<int, pair<int, int> >& rhs) {
         if (lhs.first != rhs.first)
           return lhs.first < rhs.first;
         else {
           return lhs.second.first < rhs.second.first;
         }
       });
  sort(vt3.begin(), vt3.end(),
       [](const pair<int, pair<int, int> >& lhs,
          const pair<int, pair<int, int> >& rhs) {
         if (lhs.first != rhs.first)
           return lhs.first < rhs.first;
         else {
           return lhs.second.second < rhs.second.second;
         }
       });
  sort(vt4.begin(), vt4.end(),
       [](const pair<int, pair<int, int> >& lhs,
          const pair<int, pair<int, int> >& rhs) {
         if (lhs.first != rhs.first)
           return lhs.first < rhs.first;
         else {
           return lhs.second.first < rhs.second.first;
         }
       });
  for (i = 0; i < vt1.size(); i++) {
    st1.push_back(vt1[i].first);
  }
  for (i = 0; i < vt2.size(); i++) {
    st2.push_back(vt2[i].first);
  }
  for (i = 0; i < vt3.size(); i++) {
    st3.push_back(vt3[i].first);
  }
  for (i = 0; i < vt4.size(); i++) {
    st4.push_back(vt4[i].first);
  }
  int ans1, ans2, ans3, ans4, ans;
  for (i = 0; i < m; i++) {
    ans1 = 0;
    it = lower_bound(st1.begin(), st1.end(), ip[i][0] + ip[i][1]);
    itt = upper_bound(st1.begin(), st1.end(), ip[i][0] + ip[i][1]);
    if ((itt - it) >= 2) ans1++;
    if ((itt - it) > 2) {
      itt--;
      if (vt1[it - st1.begin()].second.second != ip[i][1] &&
          vt1[itt - st1.begin()].second.second != ip[i][1])
        ans1++;
    }
    ans2 = 0;
    it = lower_bound(st2.begin(), st2.end(), ip[i][0] - ip[i][1]);
    itt = upper_bound(st2.begin(), st2.end(), ip[i][0] - ip[i][1]);
    if ((itt - it) >= 2) ans2++;
    if ((itt - it) > 2) {
      itt--;
      if (vt2[it - st2.begin()].second.first != ip[i][0] &&
          vt2[itt - st2.begin()].second.first != ip[i][0])
        ans2++;
    }
    ans3 = 0;
    it = lower_bound(st3.begin(), st3.end(), ip[i][0]);
    itt = upper_bound(st3.begin(), st3.end(), ip[i][0]);
    if ((itt - it) >= 2) ans3++;
    if ((itt - it) > 2) {
      itt--;
      if (vt3[it - st3.begin()].second.second != ip[i][1] &&
          vt3[itt - st3.begin()].second.second != ip[i][1])
        ans3++;
    }
    ans4 = 0;
    it = lower_bound(st4.begin(), st4.end(), ip[i][1]);
    itt = upper_bound(st4.begin(), st4.end(), ip[i][1]);
    if ((itt - it) >= 2) ans4++;
    if ((itt - it) > 2) {
      itt--;
      if (vt4[it - st4.begin()].second.first != ip[i][0] &&
          vt4[itt - st4.begin()].second.first != ip[i][0])
        ans4++;
    }
    ans = ans1 + ans2 + ans3 + ans4;
    output[ans]++;
  }
  for (i = 0; i < 9; i++) cout << output[i] << " ";
  cout << endl;
  return 0;
}
