include [HTML_REMOVED]
using namespace std;
int main() {
unordered_map[HTML_REMOVED]> mmap;
int n;
cin >> n;
vector[HTML_REMOVED]> garbage_positions(n);
for (int i = 0; i < n; ++i) {
int x, y;
cin >> x >> y;
garbage_positions[i] = {x, y};
mmap[x].insert(y);
}
vector<int> scores(5, 0);
for (const auto& pos : garbage_positions) {
int x = pos.first;
int y = pos.second;
if (mmap[x].count(y + 1) && mmap[x].count(y - 1) && mmap[x + 1].count(y) && mmap[x - 1].count(y)) {
int score = 0;
if (mmap[x + 1].count(y + 1)) ++score;
if (mmap[x + 1].count(y - 1)) ++score;
if (mmap[x - 1].count(y + 1)) ++score;
if (mmap[x - 1].count(y - 1)) ++score;
scores[score]++;
}
}
for (int i = 0; i <= 4; ++i) {
cout << scores[i] << endl;
}
return 0;
}