void main() {
    int n = readln.chomp.to!int;
    int[] a = readln.split.to!(int[]);
    bool[] colors = new bool[8];
    int red;
    foreach (x; a) {
        if (x < 3200) {
            colors[x/400] = true;
        } else {
            ++red;
        }
    }
    int cmin = colors.count(true).to!int;
    int cmax = min(8, cmin+red);
    writeln(cmin, " ", cmax);
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;