fn getline() -> String{
    let mut __ret = String::new();
    std::io::stdin().read_line(&mut __ret).ok();
    return __ret;
}

fn main() {
    let s = getline();
    let inp: Vec<_> = s.trim().split(' ').collect();
    let n: usize = inp[0].parse().unwrap();
    
    let s = getline();
    let inp: Vec<_> = s.trim().split(' ').collect();
    

    let mut bc = 0;
    let mut cnt = vec![false;8];
    for i in 0..n {
        let a: i32 = inp[i].parse().unwrap();
        let b: usize = a as usize/400;
        if b <= 7 {
            cnt[b] = true;
        }else{
            bc += 1;
        }
    }

    let mut sum = 0;
    for v in cnt {
        if v {
            sum += 1;
        }
    }

    if sum != 0 {
        println!("{} {}",sum,sum+bc);
    }else{
        println!("{} {}",bc,sum+bc);
    }
}
