'use strict';

let lines = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');
const N = +lines[0];
const as = lines[1].split(' ').sort();

let flags = [0, 0, 0, 0, 0, 0, 0, 0, 0];
for (let i = 0; i < as.length; i++) {
    let aa = as[i];
    if (aa >= 3200) {
        flags[8]++
    } else if (aa >= 2800) {
        flags[7] = 1
    } else if (aa >= 2400) {
        flags[6] = 1
    } else if (aa >= 2000) {
        flags[5] = 1
    } else if (aa >= 1600) {
        flags[4] = 1
    } else if (aa >= 1200) {
        flags[3] = 1
    } else if (aa >= 800) {
        flags[2] = 1
    } else if (aa >= 400) {
        flags[1] = 1
    } else if (aa >= 1) {
        flags[0] = 1
    }
}

let b = flags.reduce((s, aaa) => s + aaa, 0);

console.log((max(b - flags[8], 1))+ ' ' + b);