use proconio::input;

fn main() {
    input! {
        n: usize,
        an: [usize; n]
    };

    let mut an = an;
    an.sort();

    let mut lank = an.iter().map(|x| x / 400).collect::<Vec<usize>>();
    lank.dedup_by(|a, b| a == b && *a < 8);

    let overred = lank.iter().filter(|x| **x > 7).collect::<Vec<&usize>>().len();
    let noverred = lank.iter().filter(|x| **x < 8).collect::<Vec<&usize>>().len();
    let min = if overred > noverred {overred} else {noverred};
    let max = if overred + noverred > 8 {8} else {overred + noverred};

    println!("{} {}", min, max);
}
