"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const A = arg[1].split(" ").map(n=>parseInt(n));
    
    let answer = 0;
    let free = 0;
    let colors = [0, 0, 0, 0, 0, 0, 0, 0];
    
    for(let i in A) {
        if(A[i] < 400) {
            colors[0]++;
        } else if(A[i] < 800) {
            colors[1]++;
        } else if(A[i] < 1200) {
            colors[2]++;
        } else if(A[i] < 1600) {
            colors[3]++;
        } else if(A[i] < 2000) {
            colors[4]++;
        } else if(A[i] < 2400) {
            colors[5]++;
        } else if(A[i] < 2800) {
            colors[6]++;
        } else if(A[i] < 3200) {
            colors[7]++;
        } else {
            free++;
        }
    }
    
    answer += colors.filter(n=>n !== 0).length;
    
    console.log(answer + " " + (answer + free));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));