import java.util.Scanner;

class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),count=0,sum=0;
		int[] a=new int[8];
		for(int i=0;i<n;i++) {
			int buff=sc.nextInt();
			if(buff<400)a[0]=1;
			else if(buff<800)a[1]=1;
			else if(buff<1200)a[2]=1;
			else if(buff<1600)a[3]=1;
			else if(buff<2000)a[4]=1;
			else if(buff<2400)a[5]=1;
			else if(buff<2800)a[6]=1;
			else if(buff<3200)a[7]=1;
			else count++;
		}
		for(int i=0;i<8;i++)sum+=a[i];
		System.out.println((int)Math.max(sum, 1)+" "+(sum+count));
	}
}


/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz