use std::io::prelude::*;

fn input<T>() -> T
where
    T: std::str::FromStr,
{
    let stdin = std::io::stdin();
    let token: String = stdin
        .lock()
        .bytes()
        .map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()
}

fn main() {
    let n: usize = input();
    let a: Vec<i64> = (0..n).map(|_| input()).collect();

    let mut v = vec![0; 9];
    for i in a {
        if i < 400 {
            v[0] += 1;
        } else if i < 800 {
            v[1] += 1;
        } else if i < 1200 {
            v[2] += 1;
        } else if i < 1600 {
            v[3] += 1;
        } else if i < 2000 {
            v[4] += 1;
        } else if i < 2400 {
            v[5] += 1;
        } else if i < 2800 {
            v[6] += 1;
        } else if i < 3200 {
            v[7] += 1;
        } else {
            v[8] += 1;
        }
    }

    let c1 = &v[..8].iter().filter(|&i| *i > 0).count();
    let c2 = std::cmp::min(8, c1 + v[8]);
    println!("{} {}", c1, c2);
}
