#include <iostream>
using namespace std;
int main(){
double high,low;
int one = 0,two = 0,three = 0,four = 0,five = 0,six = 0,n;
cin >> n;
for (int i = 1;i <= n;i++){
cin >> high >> low;
if (high >= 35) one++;
if (high >= 30 && high < 35) two++;
if (high >= 25 && high < 30) three++;
if (low >= 25) four++;
if (high >= 0 && low < 0) five++;
if (low < 0) six++;
}
cout << one << " " << two << " " << three << " " << four << " " << five << " " << six;
return 0;
}