import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

const RED_OVER_INDEX = 8;

int score2index(int score) {
    foreach (i, s; [400, 800, 1200, 1600, 2000, 2400, 2800, 3200]) {
        if (score < s) {
            return cast(int)i;
        }
    }
    return RED_OVER_INDEX;
}

void main() {
    readint;
    auto a = readints;

    auto d = new int[9];
    foreach (x; a) {
        d[score2index(x)]++;
    }

    int maxAns = 0;
    int ro = d[RED_OVER_INDEX];
    for (int i = 0; i < RED_OVER_INDEX; i++) {
        if (d[i] == 0) {
            if (ro > 0) {
                ro--;
                maxAns++;
            }
        }
        else maxAns++;
    }

    auto minAns = d[0..RED_OVER_INDEX].count!(e => e > 0);
    if (d[RED_OVER_INDEX] > 0 && minAns == 0) minAns++;
    writeln(minAns, " ", maxAns);
}
