#![allow(non_snake_case)]
#![allow(unused_imports)]

use proconio::{input, fastout};
use proconio::marker::*;
use whiteread::parse_line;
use std::collections::*;
use num::*;
use num_traits::*;
use superslice::*;
use std::ops::*;

use itertools::Itertools;
use itertools_num::ItertoolsNum;

fn color(a: usize) -> usize {
    match a {
        1..=399 => 1,
        400..=799 => 2,
        800..=1199 => 3,
        1200..=1599 => 4,
        1600..=1999 => 5,
        2000..=2399 => 6,
        2400..=2799 => 7,
        2800..=3199 => 8,
        _ => 9
    }
}

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

    let mut color_kinds: HashMap<usize, usize> = HashMap::new();
    for &a in a_vec.iter() {
        let kind = color(a);
        *color_kinds.entry(kind).or_insert(0) += 1;
    }

    let max_ans = if color_kinds.keys().count() >= 8 {
        8
    } else {
        let max_v = color_kinds.get(&9).unwrap_or(&0) + color_kinds.keys().filter(|&x| *x != 9).count();

        if max_v >= 8 {
            8
        } else {
            max_v
        }
    };

    let min_ans = if color_kinds.keys().filter(|&x| *x == 9).count() == 0 {
        color_kinds.keys().count()
    } else {
        if color_kinds.keys().filter(|&x| *x != 9).count() == 0 {
            1
        } else {
            color_kinds.keys().filter(|&x| *x != 9).count()
        }
    };

    println!("{} {}", min_ans, max_ans)
}
