use whiteread::parse_line;

fn main() {
    let _n: usize = parse_line().unwrap();
    let a: Vec<u32> = parse_line().unwrap();
    let mut color = [false; 8];
    let mut free = 0;

    for &ai in &a {
        match ai {
            1..=399 => color[0] = true,
            400..=799 => color[1] = true,
            800..=1199 => color[2] = true,
            1200..=1599 => color[3] = true,
            1600..=1999 => color[4] = true,
            2000..=2399 => color[5] = true,
            2400..=2799 => color[6] = true,
            2800..=3199 => color[7] = true,
            _ => free += 1,
        }
    }
    let cnt = color.iter().filter(|&x| *x).count();
    println!("{} {}", cnt.max(1), (cnt + free).min(8));
}
