#include<stdio.h>
int n,a,i,si,br,gr,sk,bl,ye,or,re,t;
int main()
{
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a);
			if(a<400){
				si=1;
			}else if(400<=a&&a<800){
				br=1;
			}else if(800<=a&&a<1200){
				gr=1;
			}else if(1200<=a&&a<1600){
				sk=1;
			}else if(1600<=a&&a<2000){
				bl=1;
			}else if(2000<=a&&a<2400){
				ye=1;
			}else if(2400<=a&&a<2800){
				or=1;
			}else if(2800<=a&&a<3200){
				re=1;
			}else if(3200<=a){
				t++;
			}
	}
	
	printf("%d %d\n",si+br+gr+sk+bl+ye+or+re,(si+br+gr+sk+bl+ye+or+re+t)%9);
	return 0;
}