#include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <new>
#include <map>

using namespace std;
 
int main() {
	int N,g,b,gr,w,b,y,o,r,ans,sai,max,min;
	cin >> N;
	vector<int> A(N,0);

	for(int i = 0; i < N;i++){
		cin >> A[i];

		if(A[i] < 400){
			g = 1;
		}else if(A[i] < 800){
			b = 1;
		}else if(A[i] < 1200){
			gr = 1;
		}else if(A[i] < 1600){
			w = 1;
		}else if(A[i] < 2000){
			b = 1;
		}else if(A[i] < 2400){
			y = 1;
		}else if(A[i] < 2800){
			o = 1;
		}else if(A[i] < 3200){
			r = 1;
		}else {
			sai++;
		}
	}
	}

	

	ans = g + b + gr + w + b + y + o + r;
	min = ans;
	max = ans + sai;
	if(8 <= max){
		max = 8;
	}

	cout << min << endl;
	cout << max << endl;
	return 0;
}