#include <bits/stdc++.h>

using namespace std;

#define all(x) x.begin(), x.end()
#define inf ((int) 1e9)
#define Linf ((long long) 1e18)

typedef long long ll;
typedef long double ld;

const int N = 123456;
const int M = 1234567;
const int P = 400004;
const int A = 256;

ll ncr(int n, int r){

	if(n < r)
		return 0;

	if(n < 0 || r < 0)
		return 0;

	if(n == r)
		return 1;

	return ncr(n - 1, r - 1) + ncr(n - 1, r);
}


void qsort(auto * a, int i, int j){

	if(i >= j) return;

	int l = i;
	int r = j;

	while(r > l){ 

		while(r > l && a[r] >= a[l]) r--;

		if(a[r] < a[l]){
			swap(a[r], a[l]);
		}

	}	

	qsort(a, i, r - 1);
	qsort(a, r + 1, j);

	return;
}


auto bpow(auto base, auto exp, auto MOD){

	ll ans = 1;
	for(; exp; exp>>=1){
		if(exp & 1)
			ans = (ans * base) % MOD;
		base = (base * 1ll * base) % MOD;
	}

	return ans;
}


int a[1111];
int gray, brown, green, cyan, blue, yellow, orange, red, uncharted;

int main(int argc, char const *argv[])
{
	
	#ifdef Cyborg1o1
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif	

	cin.sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	int n;
	cin >> n;


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

		if(a[i] >= 1 && a[i] <= 399) gray++;
		if(a[i] >= 400 && a[i] <= 799) brown++;
		if(a[i] >= 800 && a[i] <= 1199) green++;
		if(a[i] >= 1200 && a[i] <= 1599) cyan++;
		if(a[i] >= 1600 && a[i] <= 1999) blue++;
		if(a[i] >= 2000 && a[i] <= 2399) yellow++;
		if(a[i] >= 2400 && a[i] <= 2799) orange++;
		if(a[i] >= 2800 && a[i] <= 3199) red++;
		if(a[i] >= 3200 && a[i] <= 4800) uncharted++;
	}

	// sort(a, a + n);


	int ans = 0;

	ans += (gray? 1 : 0) + (brown ? 1 : 0) + (green ? 1 : 0) + (cyan ? 1 : 0) + (blue ? 1 : 0) + (yellow ? 1 : 0) + (orange ? 1 : 0) + (red ? 1 : 0);

	int mn = 1;
	int mx = 1;

	if(ans)
		mn = mx = ans;

	if(uncharted){
		if(ans == 0)
			mn = 1;
		mx = min(uncharted + ans, 8);
	}

	cout << mn << " " << mx << endl;


	return 0;					
}