#include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>

namespace adaptor = boost::adaptors;

void solve()
{
    int64_t N;
    std::cin >> N;
    std::unordered_map<std::string, int64_t> color;
    int64_t over3200 = 0;
    for (int64_t i = 0; i < N; i++)
    {
        int64_t rate;
        std::cin >> rate;
        if (1 <= rate && rate <= 399) color["gray"]++;
        if (400 <= rate && rate <= 799) color["brown"]++;
        if (800 <= rate && rate <= 1199) color["green"]++;
        if (1200 <= rate && rate <= 1599) color["skyblue"]++;
        if (1600 <= rate && rate <= 1999) color["blue"]++;
        if (2000 <= rate && rate <= 2399) color["yellow"]++;
        if (2400 <= rate && rate <= 2799) color["orange"]++;
        if (2800 <= rate && rate <= 3199) color["red"]++;
        if (3200 <= rate) over3200++;
    }

    int64_t color_num = color.size();
    int64_t color_min = color_num;
    int64_t color_max = std::min<int64_t>(color_num + over3200, 8);
    std::cout << color_min << " " << color_max << std::endl;
}

int main()
{
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    std::cout << std::fixed << std::setprecision(15);
    solve();
}
