#include <iostream>

using namespace std;

int main() {
	int hist[9] = {0};
	int N;

	cin >> N;
	for(int i = 0; i < N; i++) {
		int a;
		cin >> a;
		if(1 <= a && a < 400) hist[0]++;
		if(400 <= a && a < 800) hist[1]++;
		if(800 <= a && a < 1200) hist[2]++;
		if(1200 <= a && a <1600) hist[3]++;
		if(1600 <= a && a < 2000) hist[4]++;
		if(2000 <= a && a < 2400) hist[5]++;
		if(2400 <= a && a < 2800) hist[6]++;
		if(2800 <= a && a < 3200) hist[7]++;
		if(3200 <= a) hist[8]++;
	}
	
	int sum = 0;
	for(int i = 0; i < 8; i++) {
		sum += (hist[i] > 0);
	}
	
	int sum2;
	int tmp = 8 - sum;
	if(tmp > hist[8]) {
		if(sum == 0) sum = hist[8];
		sum2 = sum + hist[8];
	else {
		if(sum == 0) sum = tmp;
		sum2 = sum + 8;
	}

	cout << sum << ' ' << sum2 << endl;

	return 0;

}

