#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::{HashSet, HashMap};

mod util {
    use std::io::stdin;
    use std::str::FromStr;
    use std::fmt::Debug;

    #[allow(dead_code)]
    pub fn get<T: FromStr>() -> T
        where <T as FromStr>::Err: Debug
    {
        let mut line: String = String::new();
        stdin().read_line(&mut line).unwrap();
        line.trim().parse().unwrap()
    }

    #[allow(dead_code)]
    pub fn gets<T: FromStr>() -> Vec<T>
        where <T as FromStr>::Err: Debug
    {
        let mut line: String = String::new();
        stdin().read_line(&mut line).unwrap();
        line.split_whitespace()
            .map(|t| t.parse().unwrap())
            .collect()
    }
}

fn main() {
    util::get::<usize>();
    let a: Vec<usize> = util::gets();

    let le_red = a.iter()
        .filter(|&&r| r < 3200)
        .map(|r| r / 400)
        .collect::<HashSet<_>>()
        .len();
    let g_red = a.iter().filter(|&&r| r >= 3200).count();

    println!("{} {}",
             if le_red == 0 { max(g_red, 1) } else { le_red },
             le_red + g_red);
}
