
use std::io;
use std::cmp;

fn main() {
    let mut line = String::new();
    io::stdin().read_line(&mut line);
    let N = line.trim().parse::<usize>().unwrap();
    
    let mut line = String::new();
    io::stdin().read_line(&mut line);
    let mut line = line.split_whitespace();
    let mut a = Vec::<usize>::with_capacity(N);
    for i in 0..N {
        let n = line.next().unwrap().parse::<usize>().unwrap();
        a.push(n);
    }

    let mut c = [0usize; 8];
    let mut t = 0usize;

    for i in 0..N {
        match a[i] {
            1usize...399usize => { c[0] = 1 },
            400usize...799usize => { c[1] = 1 },
            800usize...1199usize => { c[2] = 1 },
            1200usize...1599usize => { c[3] = 1 },
            1600usize...1999usize => { c[4] = 1 },
            2000usize...2399usize => { c[5] = 1 },
            2400usize...2799usize => { c[6] = 1 },
            2800usize...3199usize => { c[7] = 1 },
            n => t += 1usize
        }
    }

    let mut min = c.iter().fold(0usize, |sum, &x| sum + x);
    let max = cmp::min(8usize, min + t);
    min = cmp::max(1usize, min);

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