#include<iostream>
#include<set>
#include<vector>
#include<string>
#include<algorithm>

int main(){
    int n;
    std::cin >> n;

    std::vector<int> a(n);
    for(int i = 0; i < n; i++){
        std::cin >> a.at(i);
    }

    std::set<std::string> S;
    int free = 0;

    for(int i = 0; i < n; i++){
        if(1 <= a.at(i) && a.at(i) <= 399){
            S.insert("gray");
        }
        else if(400 <= a.at(i) && a.at(i) <= 799){
            S.insert("brown");
        }
        else if(800 <= a.at(i) && a.at(i) <= 1199){
            S.insert("green");
        }
        else if(1200 <= a.at(i) && a.at(i) <= 1599){
            S.insert("light_blue");
        }
        else if(1600 <= a.at(i) && a.at(i) <= 1999){
            S.insert("blue");
        }
        else if(2000 <= a.at(i) && a.at(i) <= 2399){
            S.insert("yellow");
        }
        else if(2400 <= a.at(i) && a.at(i) <= 2799){
            S.insert("orange");
        }
        else if(2800 <= a.at(i) && a.at(i) <= 3199){
            S.insert("red");
        }
        else if(3200 <= a.at(i)){
            free++;
        }
    }

    int minN = S.size();
    int maxN;
    if(minN == 0) {
        minN = 1;
        maxN = free;
    }
    int maxN = minN + free;
    std::cout << minN << " " << maxN << std::endl;
}