#include <iostream>

using namespace std;

int main(){
	int n;
	cin>>n;

	int a[n];
	int b[9]={0};
	int total=0;
	int other=0;
	int cnt=0;
	int min=0;

	for(int i=0;i<n;i++){
		cin>>a[i];
	}

	for(int i=0;i<n;i++){


		if(1<=a[i]&&a[i]<400){
			b[0]++;
		}
		else if(400<=a[i]&&a[i]<800){
			b[1]++;
		}
		else if(800<=a[i]&&a[i]<1200){
			b[2]++;
		}
		else if(1200<=a[i]&&a[i]<1600){
			b[3]++;
		}
		else if(1600<=a[i]&&a[i]<2000){
			b[4]++;
		}
		else if(2000<=a[i]&&a[i]<2400){
			b[5]++;
		}
		else if(2400<=a[i]&&a[i]<2800){
			b[6]++;
		}
		else if(2800<=a[i]&&a[i]<3200){
			b[7]++;
		}
		else{
			other++;
		}

		total++;
	}

	for(int i=0;i<8;i++){
		cout<<b[i]<<" ";
	}

	for(int i=0;i<8;i++){
		if(b[i]!=0){
			min++;
		}
	}
	cout<<endl;
	cout<<min<<" "l;

	// cout<<endl;

	// cout<<other<<endl;
	if(other==0){
		cout<<min<<endl;
	}else if(min+other>9){
		cout<<8<<endl;
	}else{
		cout<<other+min<<endl;
	}
	// cout<<cnt<<endl;
	// cout<<total<<endl;

	// cout<<other<<endl;


	// cout<<
	// if(other+cnt>9){
	// 	total=8;
	// }
	// cout<<cnt<<" "<<total<<endl;

}