use std::io::prelude::*;
fn main() {
    let stdin = std::io::stdin();
    let mut input = stdin.lock().lines();
    let _: usize = (&input.next().unwrap().unwrap()).trim().parse().unwrap();
    let rates: Vec<u64> = input
        .next()
        .unwrap()
        .unwrap()
        .split_whitespace()
        .map(|a| a.parse().expect("parse error"))
        .collect();
    let (the_min, the_max) = solve(&rates);
    println!("{} {}", the_min, the_max);
}

fn solve(rates: &[u64]) -> (u64, u64) {
    let mut flags = vec![false; 8];
    let mut other_ratees = 0;
    for &rate in rates {
        if rate < 3200 {
            flags[(rate / 400) as usize] = true;
        } else {
            other_ratees += 1;
        }
    }
    let minimum = flags
        .iter()
        .fold(0, |acc, &e| if e { acc + 1 } else { acc });
    (minimum, minimum + other_ratees)
}
