/**
*    created: 07.07.2020 18:55:08
**/
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using bint = boost::multiprecision::cpp_int;
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pcnt(bit) __builtin_popcountll(bit)
template<class T> bool chmax(T &a, const T &b) {if (a < b) {a = b; return 1;} return 0;}
template<class T> bool chmin(T &a, const T &b) {if (b < a) {a = b; return 1;} return 0;}
const long double pi = acos(-1.0);
const int MAX = 1000010;
const int INF = 1LL << 60;
const int MOD = 1000000007;
// const int MOD = 998244353;

signed main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

    
    int n; cin >> n;
    map<int,int> mp;
    rep(i,n) {
        int a; cin >> a;
        if (1 <= a and a < 400) mp[0]++;
        else if (400 <= a and a < 800) mp[1]++;
        else if (800 <= a and a < 1200) mp[2]++;
        else if (1200 <= a and a < 1600) mp[3]++;
        else if (1600 <= a and a < 2000) mp[4]++;
        else if (2000 <= a and a < 2400) mp[5]++;
        else if (2400 <= a and a < 2800) mp[6]++;
        else if (2800 <= a and a < 3200) mp[7]++;
        else mp[8]++;
    }
    
    if (!mp.count(8)) cout << mp.size() << " " << mp.size() << endl;
    else cout << max(mp.size()-1,1) << " " << min(8ll, (int)mp.size() - 1ll + mp[8]) << endl;
    return 0;
}
