use proconio::{input, fastout};
use proconio::marker::{Chars};
use proconio::marker::Usize1;
use std::cmp::*;

macro_rules! debug {
      ($($a:expr),*) => {
          eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

#[fastout]
fn main() {
    input!{
        n: usize,
        a: [usize;n],
    }
    let mut col: Vec<usize> = vec![0;8];
    let mut sup = 0;
    for i in 0..n {
        if 1<=a[i] && a[i]<=399 {
            col[0] += 1;
        } else if 400<=a[i] && a[i]<=799 {
            col[1] += 1;
        } else if 800<=a[i] && a[i]<=1199 {
            col[2] += 1;
        } else if 1200<=a[i] && a[i]<=1599 {
            col[3] += 1;
        } else if 1600<=a[i] && a[i]<=1999 {
            col[4] += 1;
        } else if 2000<=a[i] && a[i]<=2399 {
            col[5] += 1;
        } else if 2400<=a[i] && a[i]<=2799 {
            col[6] += 1;
        } else if 2800<=a[i] && a[i]<=3199 {
            col[7] += 1;
        } else {
            sup += 1;
        }
    }

    let mut ans = 0;
    for i in 0..col.len() {
        if col[i]!=0 {
            ans += 1;
        }
    }
    let mut min_col = 0;
    let mut max_col = 0;
    if ans==0 {
        min_col = 1;
        max_col = min(col.len(), sup);
    } else {
        min_col = ans;
        max_col = min(col.len(), ans+sup);
    }  
    // debug!(col.len());
    // debug!(ans);
    // debug!(sup);
    println!("{} {}", min_col,max_col);

}
