use std::io;
use std::collections::HashMap;

/// https://beta.atcoder.jp/contests/abc064/tasks/abc064_c
fn main() {
    let _n = read_one::<usize>();
    let vec = read::<usize>();

    let mut val = 0;
    let mut hm = HashMap::new();
    for x in vec {
        if x >= 3200 { val += 1; }
        let i = hm.entry(x / 400 + 1).or_insert(0);
        *i += 1;
    }

    if val > 0 {
        println!("{} {}", hm.len() - 1, hm.len() + val - 1);
    } else {
        println!("{} {}", hm.len(), hm.len());
    }
}


#[allow(dead_code)]
fn read<T>() -> Vec<T>
where T:
    std::str::FromStr,
    T::Err: std::fmt::Debug {

    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.split_whitespace()
        .map(|s| s.trim().parse().unwrap())
        .collect()
}

#[allow(dead_code)]
fn read_one<T>() -> T
where T:
    std::str::FromStr,
    T::Err: std::fmt::Debug {

    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.trim().parse().unwrap()
}