#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn color(val: usize) -> usize {
    if 1 <= val && val <= 399 {
        0
    } else if 400 <= val && val <= 799 {
        1
    } else if 800 <= val && val <= 1199 {
        2
    } else if 1200 <= val && val <= 1599 {
        3
    } else if 1600 <= val && val <= 1999 {
        4
    } else if 2000 <= val && val <= 2399 {
        5
    } else if 2400 <= val && val <= 2799 {
        6
    } else if 2800 <= val && val <= 3199 {
        7
    } else {
        8
    }
}

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

    let mut v = vec![0; 9];
    for i in 0..n {
        v[color(a[i])] += 1;
    }
    let min = {
        let mut val = 0;
        for i in 0..8 {
            if v[i] != 0 {
                val += 1;
            }
        }
        if v[8] != 0 {
            if val == 0 {
                val += 1;
            }
        }
        val
    };
    let max = {
        let mut val = 0;
        for i in 0..8 {
            if v[i] != 0 {
                val += 1;
            }
        }
        let left = 8 - val;
        val += std::cmp::min(left, v[8]);
        val
    };
    println!("{} {}", min, max);
}
